/** * {@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); }
/** * Overridden setter with enforced sorting behavior * * @param array $layoutRootPaths * @return void */ public function setLayoutRootPaths(array $layoutRootPaths) { parent::setLayoutRootPaths(ArrayUtility::sortArrayWithIntegerKeys($layoutRootPaths)); }