/** * Executes an application defined process prior to execution of this sfAction object. */ public function preExecute() { if (!sfConfig::get('app_rt_comment_active', true)) { throw new sfException('Comment module can\'t be used unless configured to be active i.e. app_rt_comment_active = true'); } parent::preExecute(); sfConfig::set('app_rt_node_title', 'Comment'); rtTemplateToolkit::setFrontendTemplateDir(); }
public function process_response() { if (!rtConfig::get('enable_toolbar', false)) { return; } $params = array('logs' => rtLogger::getLogs()); $params = array_merge($params, rtController::getMagicViewVars()); list($tpl, $view_class) = findTemplateFileName(rtConfig::get('rt_core_dir') . DS . 'default' . DS . 'toolbar'); $toolbar = new $view_class($tpl, $params); $response = rtResponse::getInstance(); $new_body = str_replace('</body>', $toolbar->getOutput() . '</body>', $response->getBody()); $response->setBody($new_body); }
/** * Executes an application defined process prior to execution of this sfAction object. * * By default, this method is empty. */ public function preExecute() { parent::preExecute(); sfConfig::set('app_rt_node_title', 'Site'); rtTemplateToolkit::setFrontendTemplateDir(); }
public function preExecute() { parent::preExecute(); sfConfig::set('app_rt_node_title', 'Search'); }