Esempio n. 1
0
File: Web.php Progetto: azole/Phifty
 public function render_result($resultName)
 {
     $runner = ActionRunner::getInstance();
     if ($result = $runner->getResult($resultName)) {
         $view = new View();
         $view->result = $result;
         return $view->render('@CoreBundle/phifty/action_result_box.html');
     }
 }
Esempio n. 2
0
 public function __construct($options = array())
 {
     if (isset($options['i18n'])) {
         $this->i18n = $options['i18n'];
     }
     if (isset($options['layout'])) {
         $this->layout = $options['layout'];
     }
     if (isset($options['content'])) {
         $this->content = $options['content'];
     }
     if (isset($options['cache'])) {
         $this->cache = true;
     }
     parent::__construct(@$options['engine']);
 }
Esempio n. 3
0
 public function __construct(Kernel $kernel, array $options = array())
 {
     if (isset($options['i18n'])) {
         $this->i18n = $options['i18n'];
     }
     if (isset($options['layout'])) {
         $this->layout = $options['layout'];
     }
     if (isset($options['content'])) {
         $this->content = $options['content'];
     }
     if (isset($options['cache'])) {
         $this->cache = true;
     }
     parent::__construct($kernel, $options);
 }
Esempio n. 4
0
 private function renderTemplate()
 {
     $view = new View();
     if ($this->templateVars) {
         $view->setArgs($this->templateVars);
     }
     $view->subject = $this->subject;
     $view->from = $this->from;
     $view->to = $this->to;
     return $view->render($this->template);
     /*
     $templateFile = $this->applyLangTag( $this->template );
     if ( $smt->templateExists( $templateFile ) )
         return $smt->fetch( $templateFile );
     else
         throw new Exception( "{$templateFile} doesn't exist." );
     */
 }