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


PHP AppController::beforeFilter方法代码示例

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


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

示例1: beforeFilter

 public function beforeFilter()
 {
     parent::beforeFilter();
     $user = $this->Auth->user();
     $this->Auth->allow('view');
     $this->set('user', $user);
 }
开发者ID:taijuF,项目名称:chu-itter,代码行数:7,代码来源:CategoriesController.php

示例2: beforeFilter

 /**
  * Displays a view
  *
  * @param mixed What page to display
  * @access public
  */
 public function beforeFilter()
 {
     parent::beforeFilter();
     if (isset($this->Auth)) {
         $this->Auth->allow('display');
     }
 }
开发者ID:kiang,项目名称:olc_baker,代码行数:13,代码来源:PagesController.php

示例3: beforeFilter

 function beforeFilter()
 {
     $this->Auth->allow('logout', 'reg', 'password_reset', 'view', 'acoset', 'aroset', 'permset', 'buildAcl');
     parent::beforeFilter();
     $this->Auth->autoRedirect = false;
     //debug($this->Session->read() );
 }
开发者ID:kondrat,项目名称:ta,代码行数:7,代码来源:users_controller.php

示例4: beforeFilter

 function beforeFilter()
 {
     parent::beforeFilter();
     if ('json' == $this->params['url']['ext']) {
         $this->RequestHandler->setContent('json', 'text/x-json');
     }
 }
开发者ID:bskahan,项目名称:newd,代码行数:7,代码来源:front_controller.php

示例5: beforeFilter

 function beforeFilter()
 {
     parent::beforeFilter();
     if (!empty($this->Auth)) {
         $this->Auth->allowedActions = array();
     }
 }
开发者ID:spsinghdocument,项目名称:snr-infoom,代码行数:7,代码来源:BusinessFeedbacksController.php

示例6: beforeFilter

 public function beforeFilter()
 {
     $this->RequestHandler->respondAs('json');
     $this->response->disableCache();
     $this->Auth->allow(array('view'));
     parent::beforeFilter();
 }
开发者ID:ranostaj,项目名称:iqualJs,代码行数:7,代码来源:CommentsController.php

示例7: beforeFilter

 public function beforeFilter()
 {
     parent::beforeFilter();
     //親(Appcontroller)をふまえた上
     // ユーザー自身による登録とログアウトを許可する
     $this->Auth->allow('add', 'logout');
 }
开发者ID:nimarni,项目名称:templeGET,代码行数:7,代码来源:UsersController.php

示例8: beforeFilter

 public function beforeFilter()
 {
     parent::beforeFilter();
     if (!empty($this->Auth)) {
         $this->Auth->allow('display', 'ckeditor');
     }
 }
开发者ID:trungpm-evolable,项目名称:app,代码行数:7,代码来源:PagesController.php

示例9: beforeFilter

 function beforeFilter()
 {
     parent::beforeFilter();
     if (!empty($this->Auth)) {
         $this->Auth->allowedActions = array('how_it_works', 'fetch_specific_content');
     }
 }
开发者ID:spsinghdocument,项目名称:snr-infoom,代码行数:7,代码来源:HowItWorksController.php

示例10: beforeFilter

 /**
  * beforeFilter
  * 
  * @return oid
  * @access public
  */
 function beforeFilter()
 {
     parent::beforeFilter();
     if ($this->params['prefix'] == 'admin') {
         $this->set('usePermission', true);
     }
 }
开发者ID:ryuring,项目名称:basercms,代码行数:13,代码来源:permissions_controller.php

示例11: beforeFilter

 function beforeFilter()
 {
     $this->Auth->allow('index');
     parent::beforeFilter();
     $this->Auth->autoRedirect = false;
     //debug($this->Session->read() );
 }
开发者ID:kondrat,项目名称:ta,代码行数:7,代码来源:groups_controller.php

示例12: beforeFilter

 public function beforeFilter()
 {
     parent::beforeFilter();
     if (isset($this->Auth)) {
         $this->Auth->allow('login', 'logout', 'setup');
     }
 }
开发者ID:rungrr,项目名称:drugs,代码行数:7,代码来源:MembersController.php

示例13: beforeFilter

 public function beforeFilter()
 {
     parent::beforeFilter();
     if (!isset($this->params['name'])) {
         $this->error(ECode::$BOARD_NONE);
     }
     try {
         $boardName = $this->params['name'];
         if (preg_match("/^\\d+\$/", $boardName)) {
             throw new BoardNullException();
         }
         $this->_board = Board::getInstance($boardName);
     } catch (BoardNullException $e) {
         $this->error(ECode::$BOARD_UNKNOW);
     }
     if (isset($this->params['url']['mode'])) {
         $mode = (int) trim($this->params['url']['mode']);
         if (!$this->_board->setMode($mode)) {
             $this->error(ECode::$BOARD_NOPERM);
         }
     }
     if (!$this->_board->hasReadPerm(User::getInstance())) {
         if (!$this->ByrSession->isLogin) {
             $this->requestLogin();
         }
         $this->error(ECode::$BOARD_NOPERM);
     }
     $this->_board->setOnBoard();
     $this->ByrSession->Cookie->write("XWJOKE", "hoho", false);
 }
开发者ID:rainsun,项目名称:nForum,代码行数:30,代码来源:article_controller.php

示例14: beforeFilter

 function beforeFilter()
 {
     parent::beforeFilter();
     if (Configure::read('Wildflower.htmlCache') and $this->params['action'] == 'view') {
         $this->helpers[] = 'HtmlCache';
     }
 }
开发者ID:TeckniX,项目名称:Wildflower,代码行数:7,代码来源:pages_controller.php

示例15: beforeFilter

 function beforeFilter()
 {
     parent::beforeFilter();
     Configure::write('debug', 0);
     $this->layout = 'ajax';
     $this->autoRender = false;
 }
开发者ID:Chaoslan,项目名称:mushraider,代码行数:7,代码来源:AjaxController.php


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