Exemple #1
0
 /**
  * Renders the partial form by its id
  * 
  * @param string $id Form id
  * @return string
  */
 public function render($id)
 {
     $page = $this->formManager->fetchById($id);
     if ($page !== false) {
         $this->view->disableLayout();
         // Save initial page entity
         $originalPage = $this->view->getVariable('page');
         $response = $this->view->render($page->getTemplate(), array('action' => '/module/mail-form/partial/' . $id, 'page' => $page));
         // Restore initial page entity
         $this->view->addVariable('page', $originalPage);
         unset($originalPage);
         return $response;
     } else {
         // Wrong form id supplied
         return false;
     }
 }
Exemple #2
0
 /**
  * {@inheritDoc}
  */
 public function bootstrap()
 {
     $siteService = $this->moduleManager->getModule('Team')->getService('siteService');
     $this->view->addVariable('team', $siteService);
 }