/** * @param Session $session * @return ProgramPdf */ public function __invoke(Session $session) { $pdf = new ProgramPdf(); $pdf->setTemplate($this->getModuleOptions()->getBlankTemplate()); $pdf->addPage(); $pdf->SetFontSize(8); $pdf->SetTopMargin(30); $pdf->writeHTMLCell(0, 0, '', '', '<h1 style="color: #00a651">' . $session->getSession() . '</h1>', 0, 1, 0, true, '', true); $pdf->writeHTMLCell(0, 0, '', '', $session->getDate()->format("d-m-Y"), 0, 1, 0, true, '', true); $pdf->Ln(); $pdf->Line(10, 42, 200, 42, ['color' => [0, 166, 81]]); $pdf->Ln(); //Funding information $header = [$this->translate("txt-time"), $this->translate("txt-no"), $this->translate("txt-idea"), $this->translate("txt-title"), $this->translate("txt-presenter")]; $pitches = []; foreach ($session->getIdeaSession() as $ideaSession) { $pitches[] = [$ideaSession->getSchedule(), $ideaSession->getIdea()->getNumber(), $ideaSession->getIdea()->getIdea(), $ideaSession->getIdea()->getTitle(), $ideaSession->getIdea()->getContact()->getDisplayName()]; } $pdf->coloredTable($header, $pitches, [15, 10, 25, 110, 30]); return $pdf; }