Exemplo n.º 1
0
 /**
  * attaches helpers, translator and other useful variables into template
  * called also from BaseControl::createTemplate()
  *
  * @param ITemplate
  * @return ITemplate
  */
 public function getEnrichedTemplate(ITemplate $tpl)
 {
     $tpl->setTranslator($this->getTranslator());
     $tpl->registerHelper('html', array('Helpers', 'html'));
     $tpl->registerHelper('emailSafe', array('Helpers', 'emailSafe'));
     $tpl->registerHelper('latte', array('Helpers', 'latte'));
     $tpl->registerHelperLoader('Helpers::functionLoader');
     $this->registerUser($tpl);
     $tpl->model = $this->model;
     $tpl->httpHost = $this->getHttpRequest()->getUri()->getHost();
     return $tpl;
 }