invitation = $invitation; $this->company = $invitation->company; $this->account = $this->company->account; $this->config = (new PdfConfiguration($this))->init(); $this->html_variables = (new HtmlEngine($invitation))->generateLabelsAndValues(); $this->builder = (new PdfBuilder($this)); $this->designer = (new PdfDesigner($this))->build(); $this->document_type = $document_type; $this->options = $options; } public function build() { $this->builder->build(); return $this; } public function getPdf() { } public function getHtml() { return $this->builder->getCompiledHTML(); } // $state = [ // 'template' => $template->elements([ // 'client' => $this->client, // 'entity' => $this->entity, // 'pdf_variables' => (array) $this->company->settings->pdf_variables, // '$product' => $design->design->product, // 'variables' => $variables, // ]), // 'variables' => $variables, // 'options' => [ // 'all_pages_header' => $this->entity->client->getSetting('all_pages_header'), // 'all_pages_footer' => $this->entity->client->getSetting('all_pages_footer'), // ], // 'process_markdown' => $this->entity->client->company->markdown_enabled, // ]; // $maker = new PdfMakerService($state); // $maker // ->design($template) // ->build(); }