Example #1
0
 public final function __construct()
 {
     $this->data = new Std();
     $this->app = Application::getInstance();
     $this->view = new View('twig', $this->getTemplatePaths());
     $this->view->setController($this);
 }
Example #2
0
File: Twig.php Project: pr-of-it/t4
 public function addTemplateRawPath($path)
 {
     parent::addTemplateRawPath($path);
     $loader = $this->twig->getLoader();
     $loader->setPaths($this->paths);
     $this->twig->setLoader($loader);
 }
Example #3
0
File: View.php Project: pr-of-it/t4
 public function render($template, $data = [])
 {
     return $this->postProcess($this->renderer->render($template, $data));
 }
Example #4
0
 public function setView(View $view)
 {
     parent::setView($view);
     $this->links->view = $this->view;
     $this->twig->addGlobal('view', $this->links->view);
 }