コード例 #1
0
 /**
  * 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.');
     }
 }
コード例 #2
0
 /**
  * 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();
 }
コード例 #3
0
 /**
  * @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'));
 }
コード例 #4
0
 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');
 }
コード例 #6
0
 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();
 }
コード例 #8
0
 /**
  * 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();
 }
コード例 #9
0
 public function preExecute()
 {
     rtTemplateToolkit::setTemplateForMode('backend');
 }
コード例 #10
0
 public function preExecute()
 {
     parent::preExecute();
     rtTemplateToolkit::setBackendTemplateDir();
 }
コード例 #11
0
 /**
  * Set the template.
  */
 public function preExecute()
 {
     rtTemplateToolkit::setFrontendTemplateDir();
     parent::preExecute();
 }
コード例 #12
0
 public function preExecute()
 {
     sfConfig::set('app_rt_node_title', 'Gift Voucher');
     rtTemplateToolkit::setFrontendTemplateDir();
 }