當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。