Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function __construct($options = [], Application $app = null)
 {
     $templatePaths = new TemplatePaths();
     $this->app = $app;
     $templatePaths->setTemplateRootPaths(array(base_path() . '/resources/Private/Templates/'));
     $templatePaths->setLayoutRootPaths(array(base_path() . '/resources/Private/Layouts/'));
     $templatePaths->setPartialRootPaths(array(base_path() . '/resources/Private/Partials/'));
     $this->view = new TemplateView($templatePaths);
     $context = $this->view->getRenderingContext();
     $context->setControllerName($this->determineControllerName());
     $this->view->setRenderingContext($context);
 }
Ejemplo n.º 2
0
 /**
  * Overridden setter with enforced sorting behavior
  *
  * @param array $partialRootPaths
  * @return void
  */
 public function setPartialRootPaths(array $partialRootPaths)
 {
     parent::setPartialRootPaths(ArrayUtility::sortArrayWithIntegerKeys($partialRootPaths));
 }