/** * Pull together all the parameters for the template * * @param TemplateAbstract $template * * @return array */ protected function getTemplateParameters(TemplateAbstract $template) { // merge the controller parameters $templateParams = array(); $controllerParams = $this->controller->getControllerParameters(); if (is_array($controllerParams)) { $templateParams = array_merge($this->controller->getParameters(), $controllerParams); } // and merge with any pre-existing template parameters $templateParams = array_merge($templateParams, $template->getParameters()); // local params to pass $params = array('absoluteStubUrl' => $this->absoluteStubUrl, 'device' => $this->request->getDevice()); return array_merge($templateParams, $params); }
/** * Location of the template cache directory * * @param string $dir absolute location of the template cache directory * * @return void */ public function setCacheDir($dir) { $dir .= DIRECTORY_SEPARATOR . 'twig'; parent::setCacheDir($dir); }
/** * Location of the template cache directory * * @param string $dir absolute location of the template cache directory * * @return void */ public function setCacheDir($dir) { $dir .= DIRECTORY_SEPARATOR . 'smarty'; Logger::debug("Smarty cache dir set to: " . $dir); parent::setCacheDir($dir); }