|null */ public ?string $className; /** * @param class-string|null $className */ public function __construct(?int $id, int $renderer, ?int $latexId, string $title, ?string $preview, ?string $className) { $this->id = $id; $this->renderer = $renderer; $this->latexId = $latexId; $this->title = $title; $this->preview = $preview; $this->className = $className; } public function isHtmlToPdfLayout(): bool { return $this->renderer === self::RENDERER_WEASYPRINT; } public function getHtmlId(): string { if ($this->isHtmlToPdfLayout()) { return 'html2pdf' . $this->id; } elseif ($this->id !== null) { return 'php' . $this->id; } else { return 'latex' . $this->latexId; } } }