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


PHP AppController::initialize方法代码示例

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


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

示例1: initialize

 public function initialize()
 {
     parent::initialize();
     $this->loadComponent('RequestHandler');
     $this->loadComponent('Paginator');
     $this->loadComponent('Excel');
 }
开发者ID:ricardohenriq,项目名称:shooping,代码行数:7,代码来源:ProductsController.php

示例2: initialize

 /**
  * Initialize callback
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     if ($this->request->action === 'index') {
         $this->loadComponent('Recaptcha.Recaptcha');
     }
 }
开发者ID:cake17,项目名称:cakephp-recaptcha,代码行数:12,代码来源:ContactController.php

示例3: initialize

 /**
  * Initialize callback
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     if (in_array($this->request->action, ['index', 'multipleWidgets'])) {
         $this->loadComponent('Recaptcha.Recaptcha');
     }
 }
开发者ID:cakephp-fr,项目名称:recaptcha,代码行数:12,代码来源:ContactController.php

示例4: initialize

 /**
  * Initialize
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     $this->loadComponent('Security');
     $this->loadComponent('Csrf');
     $this->loadComponent('CakeDC/Users.UsersAuth');
 }
开发者ID:OrigamiStructures,项目名称:users,代码行数:12,代码来源:AppController.php

示例5: initialize

 public function initialize()
 {
     parent::initialize();
     /**
      * Define Content settings
      */
     Configure::write('Content', ['defaultUsersTable' => 'Users', 'defaultRolesTable' => 'Roles', 'defaultSiteId' => 1]);
     /**
      * Manage site selector
      */
     if ($this->request->is(['patch', 'post', 'put'])) {
         if (isset($this->request->data['current_site_id'])) {
             $this->request->session()->write('Content.currentSiteId', intval($this->request->data['current_site_id']));
         }
     }
     $this->CmsSites = TableRegistry::get('Content.CmsSites');
     $sites = $this->CmsSites->find('all')->toArray();
     $site_selector = [];
     foreach ($sites as $row) {
         $site_selector[$row->id] = $row->name;
         if (!$this->request->session()->check('Content.currentSiteId')) {
             $this->request->session()->write('Content.currentSiteId', $row->id);
         }
     }
     $this->set(compact('site_selector'));
 }
开发者ID:aoliverio,项目名称:content,代码行数:26,代码来源:AppController.php

示例6: initialize

 public function initialize()
 {
     parent::initialize();
     $this->loadModel('Messages');
     $this->loadModel('Offers');
     $this->loadModel('Applies');
 }
开发者ID:CalypsoTeam,项目名称:Noddi,代码行数:7,代码来源:DashboardController.php

示例7: initialize

 /**
  * Initialization hook method.
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     // Deny public access
     $this->Auth->deny('index');
     $this->Auth->config('unauthorizedRedirect', ['controller' => 'forums', 'action' => 'index']);
 }
开发者ID:Hazzaman,项目名称:forum,代码行数:12,代码来源:ThreadsController.php

示例8: initialize

 public function initialize()
 {
     parent::initialize();
     $this->viewBuilder()->layout('frontend');
     $this->response->disableCache();
     $this->set('webroot_full', Router::url('/', true));
 }
开发者ID:hongtien510,项目名称:giapha,代码行数:7,代码来源:FrontendController.php

示例9: initialize

 public function initialize()
 {
     parent::initialize();
     //		$this->connectCrudViews([
     //            'Activities.duplicateActivityRow'
     //            ]);
 }
开发者ID:OrigamiStructures,项目名称:foldingTime,代码行数:7,代码来源:ActivitiesController.php

示例10: initialize

 /**
  * Initialization hook method.
  *
  * Use this method to add common initialization code like loading components.
  *
  * @return void
  */
 public function initialize()
 {
     $this->helpers[] = 'CkTools.CkTools';
     $this->helpers[] = 'ListFilter.ListFilter';
     $this->components[] = 'ListFilter.ListFilter';
     parent::initialize();
 }
开发者ID:codekanzlei,项目名称:cake-notifications,代码行数:14,代码来源:AppController.php

示例11: initialize

 /**
  *Initialize
  */
 public function initialize()
 {
     parent::initialize();
     // TODO: Change the autogenerated stub
     $this->loadModel('Advertisements');
     $this->loadModel('News');
     $this->loadModel('Banners');
     $this->loadModel('NewsCategories');
     $this->loadModel('Inquiries');
     $this->loadModel('Activities');
     $this->loadModel('Contacts');
     $this->loadModel('Settings');
     $this->loadModel('Members');
     $this->loadModel('HomeMenus');
     $this->loadModel('TypeCompanies');
     $this->loadModel('TypeBusiness');
     $this->loadModel('Productions');
     $this->loadModel('CompanyInquiries');
     $this->loadModel('RegisterInquiries');
     $this->loadModel('EmailStacks');
     $this->loadModel('Members');
     $this->loadModel('Events');
     $this->loadModel('Supporters');
     $this->loadModel('CategorySupporters');
     $this->loadModel('SupporterCities');
 }
开发者ID:nguyennghiem1205,项目名称:japan-circle,代码行数:29,代码来源:PagesController.php

示例12: initialize

 public function initialize()
 {
     parent::initialize();
     $this->loadComponent('Flash');
     // Include the FlashComponent
     $this->Auth->allow(['index']);
 }
开发者ID:paulohsilvavieira,项目名称:ClientTasks,代码行数:7,代码来源:DefaultController.php

示例13: initialize

 public function initialize()
 {
     parent::initialize();
     // Set the layout
     $this->viewBuilder()->layout('admin');
     $this->loadComponent('Cewi/Excel.Import');
 }
开发者ID:rashmi,项目名称:newrepo,代码行数:7,代码来源:ProductsController.php

示例14: initialize

 /**
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     $this->viewClass = 'CrudView\\View\\CrudView';
     $tables = ['Clients', 'Scopes'];
     $this->loadComponent('Crud.Crud', ['actions' => ['index' => ['className' => 'Crud.Index', 'scaffold' => ['tables' => $tables]], 'view' => ['className' => 'Crud.View', 'scaffold' => ['tables' => $tables]], 'edit' => ['className' => 'Crud.Edit', 'scaffold' => ['tables' => $tables, 'fields' => ['id' => ['label' => 'ID', 'type' => 'text'], 'description']]], 'add' => ['className' => 'Crud.Add', 'scaffold' => ['tables' => $tables, 'fields' => ['id' => ['label' => 'ID', 'type' => 'text'], 'description']]], 'delete' => ['className' => 'Crud.Delete', 'scaffold' => ['tables' => $tables]]], 'listeners' => ['CrudView.View', 'Crud.RelatedModels', 'Crud.Redirect']]);
 }
开发者ID:aansubarkah,项目名称:sso-people,代码行数:10,代码来源:ScopesController.php

示例15: initialize

 public function initialize()
 {
     parent::initialize();
     // Set the layout
     $this->viewBuilder()->layout('admin');
     //$this->Auth->allow();
 }
开发者ID:rashmi,项目名称:newrepo,代码行数:7,代码来源:WishlistsController.php


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