/** * * @param string $viewPath * @param Controller $controller */ public function __construct($viewPath, Controller $controller) { $this->contents = new KeyValueArray(); $this->viewPath = $viewPath; $this->controller = $controller; $this->viewData = $this->controller->getViewData(); $this->helper = new \Pvik\Web\ViewHelpers\HtmlHelper(); $this->executePartialCode($this->viewPath); if ($this->masterPagePath != null) { Log::writeLine('Executing masterpage: ' . $this->masterPagePath); $baseMasterPage = new MasterPage($this->realPath($this->masterPagePath), $this); } }
/** * Searches a view in the PvikAdminTools view folder and executes it. * @param string $actionName * @param string $folder */ protected function executeViewByAction($actionName, $folder = '') { if ($folder == '') { $folder = \Pvik\Core\Config::$config['PvikAdminTools']['BasePath'] . 'Views/'; } parent::executeViewByAction($actionName, $folder); }