/**
  * 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();
 }
 /**
  * @see sfPluginConfiguration
  */
 public function initialize()
 {
     rtTemplateToolkit::setBackendTemplateDir();
     if (sfConfig::get('sf_app') === 'frontend') {
         $this->dispatcher->connect('routing.load_configuration', array($this, 'listenToRoutingLoadConfigurationFrontend'));
     }
     $this->dispatcher->connect('controller.page_not_found', array('rtNotFoundSubscriber', 'handle'));
     date_default_timezone_set("Australia/Sydney");
     sfConfig::set('sf_default_timezone', sfConfig::get('app_rt_default_timezone', 'Australia/Sydney'));
 }
 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()
 {
     rtTemplateToolkit::setTemplateForMode('backend');
     sfConfig::set('app_rt_node_title', 'Promotions');
 }
 public function preExecute()
 {
     parent::preExecute();
     rtTemplateToolkit::setBackendTemplateDir();
     sfConfig::set('app_rt_node_title', 'Search');
 }
예제 #7
0
 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();
 }
 public function preExecute()
 {
     rtTemplateToolkit::setTemplateForMode('backend');
 }
 public function preExecute()
 {
     parent::preExecute();
     rtTemplateToolkit::setBackendTemplateDir();
 }
 /**
  * Set the template.
  */
 public function preExecute()
 {
     rtTemplateToolkit::setFrontendTemplateDir();
     parent::preExecute();
 }
 public function preExecute()
 {
     sfConfig::set('app_rt_node_title', 'Gift Voucher');
     rtTemplateToolkit::setFrontendTemplateDir();
 }