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


PHP AppController类代码示例

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


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

示例1: modify

 function modify()
 {
     global $lll, $siteDemo, $allowedMethods;
     $found = FALSE;
     if ($siteDemo || !class_exists('rss')) {
         // It is disabled to save these attributes in the demo version:
         foreach (array("extraHead", "extraBody", "extraTopContent", "extraBottomContent", "extraFooter", "logoImage", "headerBackground") as $attr) {
             if (!empty($this->{$attr})) {
                 $found = TRUE;
                 $this->{$attr} = "";
             }
         }
     }
     foreach (array("homeLocation", "redirectFirstLogin", "redirectLogin", "redirectAdminLogin") as $attr) {
         $ctrl = new AppController();
         if ($this->{$attr}) {
             if (!$ctrl->init($this->{$attr}) || !isset($allowedMethods[$ctrl->method]) || !class_exists($ctrl->getClass())) {
                 return Roll::setFormInvalid("invalidInternalLink", $this->{$attr});
             }
         }
     }
     modify($this);
     $this->uploadImages();
     if ($found) {
         Roll::setInfoText("This feature is not available in the Lite (and demo) version of the program!");
     }
 }
开发者ID:alencarmo,项目名称:OCF,代码行数:27,代码来源:settings.php

示例2: 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

示例3: getRequest

 /**
  * Get request object for current request. Returns null if no request is available 
  * (if, for example, the plugin is being run in a batch script - scripts don't use the request/response model)
  *
  * @return Request object or null if no request object is available
  */
 public function getRequest()
 {
     if (($o_app = AppController::getInstance()) && ($o_req = $o_app->getRequest())) {
         return $o_req;
     }
     return null;
 }
开发者ID:idiscussforum,项目名称:providence,代码行数:13,代码来源:BaseApplicationPlugin.php

示例4: title

 /**
  * Build SEO title
  *
  * @param string $pageTitle Title of the current item/page/posts...
  */
 function title($pageTitle = null)
 {
     if (!is_object($this->controller)) {
         return;
     }
     if (!$pageTitle) {
         $pageTitle = $this->controller->pageTitle;
     }
     if (!$pageTitle) {
         $pageTitle = ucwords($this->controller->params['controller']);
     }
     $description = Configure::read('AppSettings.description');
     $nameAndDescription = hsc(Configure::read('AppSettings.site_name'));
     if ($description) {
         $description = hsc($description);
         $nameAndDescription = "{$nameAndDescription} - {$description}";
     }
     if ($this->controller->isHome) {
         $this->controller->pageTitle = $nameAndDescription;
     } else {
         $this->controller->pageTitle = "{$pageTitle} • {$nameAndDescription}";
     }
     $this->controller->set('page_title_for_layout', $pageTitle);
     $this->controller->set('site_title_for_layout', $nameAndDescription);
 }
开发者ID:alfo1,项目名称:wildflower,代码行数:30,代码来源:seo.php

示例5: 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

示例6: 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

示例7: beforeFilter

 public function beforeFilter()
 {
     parent::beforeFilter();
     // what pages are allowed for non-logged-in users
     $this->Auth->allow('xml');
     $this->Auth->allow('csv');
     $this->Auth->allow('nids');
     $this->Auth->allow('hids_md5');
     $this->Auth->allow('hids_sha1');
     $this->Auth->allow('text');
     $this->Auth->allow('dot');
     $this->Auth->allow('restSearch');
     $this->Auth->allow('stix');
     // TODO Audit, activate logable in a Controller
     if (count($this->uses) && $this->{$this->modelClass}->Behaviors->attached('SysLogLogable')) {
         $this->{$this->modelClass}->setUserData($this->activeUser);
     }
     // convert uuid to id if present in the url, and overwrite id field
     if (isset($this->params->query['uuid'])) {
         $params = array('conditions' => array('Event.uuid' => $this->params->query['uuid']), 'recursive' => 0, 'fields' => 'Event.id');
         $result = $this->Event->find('first', $params);
         if (isset($result['Event']) && isset($result['Event']['id'])) {
             $id = $result['Event']['id'];
             $this->params->addParams(array('pass' => array($id)));
             // FIXME find better way to change id variable if uuid is found. params->url and params->here is not modified accordingly now
         }
     }
     // if not admin or own org, check private as well..
     if (!$this->_isSiteAdmin()) {
         $this->paginate = Set::merge($this->paginate, array('conditions' => array("OR" => array(array('Event.org =' => $this->Auth->user('org')), "AND" => array(array('Event.distribution >' => 0), Configure::read('MISP.unpublishedprivate') ? array('Event.published =' => 1) : array())))));
     }
 }
开发者ID:vman747,项目名称:MISP,代码行数:32,代码来源:EventsController.php

示例8: beforeFilter

 public function beforeFilter()
 {
     parent::beforeFilter();
     $this->Auth->allow();
     $this->set('logged_user', $this->Auth->user());
     $this->layout = 'cultural';
 }
开发者ID:iqbaltiger,项目名称:datasurveyproject-cakephp,代码行数:7,代码来源:CommunityController.php

示例9: __construct

 public function __construct()
 {
     parent::__construct();
     $this->TiposPagamento = new TiposPagamento();
     $this->SituacaoConta = new SituacaoConta();
     $this->layout = 'painel';
 }
开发者ID:brunoblauzius,项目名称:sistema,代码行数:7,代码来源:ParametrosController.php

示例10: beforeFilter

 public function beforeFilter()
 {
     parent::beforeFilter();
     if ($this->action == 'admin_edit') {
         $this->Security->disabledFields = array('alias');
     }
 }
开发者ID:alandesign,项目名称:croogo,代码行数:7,代码来源:types_controller.php

示例11: beforeFilter

 function beforeFilter()
 {
     parent::beforeFilter();
     // $this->Auth->allow('*');
     //$this->set('menuTab', 'kelas');
     //$this->set('menuTabChild', 'kuis');
 }
开发者ID:ardianferdianto,项目名称:skope2,代码行数:7,代码来源:quizzs_questions_controller.php

示例12: 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

示例13: beforeFilter

 /**
  * beforeFilter
  *
  * @return void
  */
 public function beforeFilter()
 {
     parent::beforeFilter();
     if (!empty($this->siteConfigs['editor']) && $this->siteConfigs['editor'] != 'none') {
         $this->helpers[] = $this->siteConfigs['editor'];
     }
 }
开发者ID:baserproject,项目名称:basercms,代码行数:12,代码来源:EditorTemplatesController.php

示例14: beforeFilter

 public function beforeFilter()
 {
     parent::beforeFilter();
     // We're doing a backend request, require backend access
     $this->requireBackend();
     $this->set('at_backendpanel', true);
 }
开发者ID:ubnetdef,项目名称:injectengine,代码行数:7,代码来源:BackendAppController.php

示例15: beforeFilter

 /**
  * Displays a view
  *
  * @return void
  * @throws NotFoundException When the view file could not be found
  *	or MissingViewException in debug mode.
  */
 function beforeFilter()
 {
     parent::beforeFilter();
     $this->layout = 'homepage';
     //allows pages without auth so you dont have 2 login :):):):):):)
     $this->Auth->allow('display');
 }
开发者ID:sianto1997,项目名称:XLabs,代码行数:14,代码来源:PagesController.php


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