Esempio n. 1
0
 /**
  * Move this to here to have config cache working
  * @return array
  */
 public function getControllerPluginConfig()
 {
     return ['factories' => ['renderNda' => function ($sm) {
         $renderNda = new RenderNda();
         $renderNda->setServiceLocator($sm->getServiceLocator());
         return $renderNda;
     }, 'renderProgramDoa' => function ($sm) {
         $renderDoa = new RenderDoa();
         $renderDoa->setServiceLocator($sm->getServiceLocator());
         return $renderDoa;
     }]];
 }
Esempio n. 2
0
 public function testCanRenderCallNda()
 {
     $renderNda = new RenderNda();
     $renderNda->setServiceLocator($this->serviceManager);
     $contact = new Contact();
     $contact->setFirstName('Johan');
     $contact->setLastName('van der Heide');
     $nda = new Nda();
     $nda->setContact($contact);
     $pdf = $renderNda->renderForCall($nda);
     $this->assertInstanceOf("Program\\Controller\\Plugin\\ProgramPdf", $pdf);
     $this->assertTrue(strlen($pdf->getPDFData()) > 0);
 }
Esempio n. 3
0
 /**
  * Move this to here to have config cache working.
  *
  * @return array
  */
 public function getControllerPluginConfig()
 {
     return ['invokables' => ['getProgramFilter' => Plugin\GetFilter::class], 'factories' => ['renderNda' => function (PluginManager $sm) {
         $renderNda = new RenderNda();
         $renderNda->setServiceLocator($sm->getServiceLocator());
         return $renderNda;
     }, 'renderProgramDoa' => function (PluginManager $sm) {
         $renderDoa = new RenderDoa();
         $renderDoa->setServiceLocator($sm->getServiceLocator());
         return $renderDoa;
     }, 'renderSession' => function (PluginManager $sm) {
         $renderSession = new RenderSession();
         $renderSession->setServiceLocator($sm->getServiceLocator());
         return $renderSession;
     }]];
 }