/**
  * Executes an application defined process prior to execution of this sfAction object.
  *
  * By default, this method is empty.
  */
 public function preExecute()
 {
     $this->dispatcher->notify(new sfEvent($this, 'rt.controller_pre_execute'));
     sfConfig::set('app_rt_node_title', 'Site');
     rtTemplateToolkit::setFrontendTemplateDir();
     if (!$this->getRtSite()) {
         $this->forward404('Failed to retrieve site.');
     }
 }
 /**
  * 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 executeIndex(sfWebRequest $request)
 {
     rtTemplateToolkit::setFrontendTemplateDir();
     $this->setPage($request->getParameter('page', 1));
     $form = new rtSearchForm();
     if ($request->hasParameter('q')) {
         //$this->number_of__results = Doctrine::getTable('rtIndex')->getNumberOfMatchedResults($request->getParameter('q'), $this->getUser()->getCulture());
         $form->setDefault('q', $request->getParameter('q', ''));
         $query = Doctrine::getTable('rtIndex')->getBasePublicSearchQuery($request->getParameter('q'), $this->getUser()->getCulture());
         $pager = new sfDoctrinePager('rtIndex');
         $pager->setPage($this->getPage($request));
         $pager->setQuery($query);
         $pager->init();
         $this->pager = $pager;
     }
     $this->form = $form;
 }
 public function preExecute()
 {
     sfConfig::set('app_rt_node_title', 'Users');
     rtTemplateToolkit::setFrontendTemplateDir();
     parent::preExecute();
 }
 /**
  * Executes an application defined process prior to execution of this sfAction object.
  *
  * By default, this method is empty.
  */
 public function preExecute()
 {
     sfConfig::set('app_rt_node_title', 'Shop Category');
     rtTemplateToolkit::setFrontendTemplateDir();
 }
 /**
  * Set the template.
  */
 public function preExecute()
 {
     rtTemplateToolkit::setFrontendTemplateDir();
     parent::preExecute();
 }
 public function preExecute()
 {
     sfConfig::set('app_rt_node_title', 'Gift Voucher');
     rtTemplateToolkit::setFrontendTemplateDir();
 }