当前位置: 首页>>代码示例>>PHP>>正文


PHP AppController::beforeRender方法代码示例

本文整理汇总了PHP中AppController::beforeRender方法的典型用法代码示例。如果您正苦于以下问题:PHP AppController::beforeRender方法的具体用法?PHP AppController::beforeRender怎么用?PHP AppController::beforeRender使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AppController的用法示例。


在下文中一共展示了AppController::beforeRender方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: beforeRender

 function beforeRender()
 {
     parent::beforeRender();
     if (!Configure::read('Status.allow')) {
         return $this->redirect($this->referer());
     }
 }
开发者ID:sersilva,项目名称:status,代码行数:7,代码来源:status_app_controller.php

示例2: beforeRender

 public function beforeRender()
 {
     parent::beforeRender();
     if ($this->request->action === 'admin_login') {
         $this->layout = 'login';
     }
 }
开发者ID:wangshipeng,项目名称:license,代码行数:7,代码来源:UsersController.php

示例3: beforeRender

 /**
  * Model::beforeRender() callback.
  */
 public function beforeRender()
 {
     parent::beforeRender();
     $this->set('attachmentModel', $this->modelClass);
     $this->set('model', $this->model);
     $this->set('modelId', $this->modelId);
 }
开发者ID:styfle,项目名称:core,代码行数:10,代码来源:attachments_controller.php

示例4: beforeRender

 public function beforeRender()
 {
     parent::beforeRender();
     $this->set('exec_time', microtime() - $this->_startTime);
     $this->set('totalCount', $this->_totalCount);
     $this->set('successCount', $this->_successCount);
 }
开发者ID:nilBora,项目名称:konstruktor,代码行数:7,代码来源:TestController.php

示例5: beforeRender

 /**
  * beforeRender callback
  *
  * @return void
  * @access public
  */
 public function beforeRender()
 {
     parent::beforeRender();
     if (in_array($this->action, array('add', 'edit', 'home'))) {
         $this->set('paymentMethods', array('bank' => __('Bank Account Transfer', true), 'cheque' => __('Post Office Remittance', true)));
     }
 }
开发者ID:hadzi,项目名称:brekfarm,代码行数:13,代码来源:users_controller.php

示例6: beforeRender

 function beforeRender()
 {
     parent::beforeRender();
     $this->set('service_titles', $this->service_titles);
     $this->set('service_status', $this->service_status);
     $this->set('service_schedule', $this->service_schedule);
 }
开发者ID:searchfirst,项目名称:ODN,代码行数:7,代码来源:services_controller.php

示例7: beforeRender

 public function beforeRender()
 {
     parent::beforeRender();
     $breadcrumbs = array(array('link' => Router::url(array('controller' => 'pages', 'action' => 'index')), 'text' => __('Home'), 'active' => ''), array('link' => Router::url(array('controller' => 'condos', 'action' => 'index')), 'text' => __n('Condo', 'Condos', 2), 'active' => ''), array('link' => Router::url(array('controller' => 'condos', 'action' => 'view', $this->getPhkRequestVar('condo_id'))), 'text' => $this->getPhkRequestVar('condo_text'), 'active' => ''), array('link' => '', 'text' => __('Drafts'), 'active' => 'active'));
     $headerTitle = __('Drafts');
     $this->set(compact('breadcrumbs', 'headerTitle'));
 }
开发者ID:phalkaline,项目名称:phkondo,代码行数:7,代码来源:DraftsController.php

示例8: beforeRender

 public function beforeRender()
 {
     AppController::beforeRender();
     $subMenu = array(array("Autorisations", array('controller' => 'Autorisation', 'action' => 'index'), $this->params['action'] == 'index'), array("Membres", array('controller' => 'Autorisation', 'action' => 'members'), $this->params['action'] == 'members'));
     $this->set('subMenu', $subMenu);
     $this->layout = 'connected';
 }
开发者ID:sergeguban,项目名称:ffcportail,代码行数:7,代码来源:AutorisationController.php

示例9: beforeRender

 public function beforeRender()
 {
     parent::beforeRender();
     $this->set('section', $this->section);
     $this->set('CMS', Configure::read('Cms.Name'));
     $this->set('admin', $this->Auth->user());
 }
开发者ID:ilbesculpi,项目名称:codetron-cakephp2,代码行数:7,代码来源:app_controller.php

示例10: beforeRender

 /**
  * Called after the controller action is run, but before the view is rendered.
  *
  * Used to ensure that json responses are handled correctly by the action
  *
  * @link http://book.cakephp.org/view/984/Callbacks
  * @return void
  */
 public function beforeRender()
 {
     parent::beforeRender();
     Configure::write('debug', 0);
     $this->request->action = 'response';
     $this->layout = false;
 }
开发者ID:superstarrajini,项目名称:cakepackages,代码行数:15,代码来源:ApiController.php

示例11: beforeRender

 function beforeRender()
 {
     parent::beforeRender();
     if (strtolower(Configure::read('Newsletter.send_method')) == 'smtp' && $this->Email->smtpError) {
         $this->log('newsletter_smtp_errors', $this->Email->smtpError);
         Configure::write('Newsletter.smtp_errors', $this->Email->smtpError);
     }
 }
开发者ID:rchavik,项目名称:infinitas,代码行数:8,代码来源:newsletter_app_controller.php

示例12: beforeRender

 public function beforeRender()
 {
     parent::beforeRender();
     if (!empty($this->path)) {
         $this->page_data['body_id'] .= '-' . implode('-', $this->path);
         $this->set($this->page_data);
     }
 }
开发者ID:mathg,项目名称:emile,代码行数:8,代码来源:PagesController.php

示例13: beforeRender

 function beforeRender()
 {
     parent::beforeRender();
     $stateOptions = $this->User->stateOptions();
     $groups = $this->Group->find('list', array('fields' => 'id,name'));
     $companies = $this->Company->find('list', array('fields' => 'id, name', 'permissionable' => false, 'conditions' => array('Company.history_status' => 1)));
     $this->set(compact('stateOptions', 'companies', 'groups'));
 }
开发者ID:a0108393,项目名称:cms-system,代码行数:8,代码来源:UsersController.php

示例14: beforeRender

 public function beforeRender()
 {
     parent::beforeRender();
     $breadcrumbs = array(array('link' => Router::url(array('controller' => 'pages', 'action' => 'index')), 'text' => __('Home'), 'active' => ''));
     if ($this->viewVars['page'] == 'login') {
         $breadcrumbs[1] = array('link' => '', 'text' => __('Start Session'), 'active' => 'active');
     }
     $this->set(compact('breadcrumbs'));
 }
开发者ID:cepedag14,项目名称:phkondo,代码行数:9,代码来源:PagesController.php

示例15: beforeRender

 /**
  * Escapes the viewVars.
  *
  * @return void
  */
 public function beforeRender()
 {
     parent::beforeRender();
     foreach ($this->viewVars as $key => $value) {
         if (!is_object($value)) {
             $this->viewVars[$key] = h($value);
         }
     }
 }
开发者ID:pritten,项目名称:SmartCitizen.me,代码行数:14,代码来源:CakeErrorController.php


注:本文中的AppController::beforeRender方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。