當前位置: 首頁>>代碼示例>>PHP>>正文


PHP View::initialize方法代碼示例

本文整理匯總了PHP中Cake\View\View::initialize方法的典型用法代碼示例。如果您正苦於以下問題:PHP View::initialize方法的具體用法?PHP View::initialize怎麽用?PHP View::initialize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Cake\View\View的用法示例。


在下文中一共展示了View::initialize方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: initialize

 /**
  * Initialization hook method.
  *
  * For e.g. use this method to load a helper for all views:
  * `$this->loadHelper('Html');`
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     if (Configure::read('Facebook.app_id')) {
         $this->loadHelper('JorgeFacebook.Facebook');
     }
 }
開發者ID:jorgejardim,項目名稱:cakephp-skeleton-systems,代碼行數:15,代碼來源:AppView.php

示例2: initialize

 /**
  * Initialization hook method.
  *
  * For e.g. use this method to load a helper for all views:
  * `$this->loadHelper('Html');`
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     if ($this->request->action === 'add') {
         //$this->loadHelper('Tag.TagCloud');
     }
 }
開發者ID:matthiasmoritz,項目名稱:exlibris,代碼行數:15,代碼來源:AppView.php

示例3: initialize

 /**
  * Initialization hook method.
  *
  * For e.g. use this method to load a helper for all views:
  * `$this->loadHelper('Html');`
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     $this->loadHelper('Html');
     $this->loadHelper('Form');
     $this->loadHelper('MyUtils');
 }
開發者ID:ericgarn77,項目名稱:admin_src,代碼行數:15,代碼來源:AppView.php

示例4: initialize

 /**
  * Initialization hook method.
  *
  * For e.g. use this method to load a helper for all views:
  * `$this->loadHelper('Html');`
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     //     	$this->loadHelper('Html');
     //     	$this->loadHelper('Form');
     //     	$this->loadHelper('Flash');
 }
開發者ID:TranBinhLuan,項目名稱:junzeron,代碼行數:15,代碼來源:AppView.php

示例5: initialize

 /**
  * Initialization hook method.
  *
  * Properties like $helpers etc. cannot be initialized statically in your custom
  * view class as they are overwritten by values from controller in constructor.
  * So this method allows you to manipulate them as required after view instance
  * is constructed.
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     $this->_setupPaths();
     $this->_setupHelpers();
     $this->_loadAssets();
 }
開發者ID:GuidoHendriks,項目名稱:crud-view,代碼行數:17,代碼來源:CrudView.php

示例6: initialize

 /**
  * Initialization hook method.
  *
  * For e.g. use this method to load a helper for all views:
  * `$this->loadHelper('Html');`
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     $this->loadHelper('Flash');
     $this->loadHelper('Number');
     $this->loadHelper('Text');
     $this->loadHelper('Time');
 }
開發者ID:array-pop-tarts,項目名稱:flimsy,代碼行數:16,代碼來源:AppView.php

示例7: initialize

 public function initialize()
 {
     parent::initialize();
     $this->loadHelper('Admin.Menu');
     if ($this->request->action === 'edit' || $this->request->action === 'add') {
         $this->loadHelper('Form', ['templates' => 'Admin.app_form']);
     }
 }
開發者ID:bartekpie3,項目名稱:cakeAdmiin,代碼行數:8,代碼來源:AppView.php

示例8: initialize

 /**
  * Initialization hook method.
  *
  * Use this method to add common initialization code like loading helpers.
  *
  * e.g. `$this->loadHelper('Html');`
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     $this->loadHelper('Html');
     $this->loadHelper('Form');
     $this->loadHelper('Paginator');
     $this->loadHelper('Url');
     $this->loadHelper('Flash');
 }
開發者ID:JesseDarellMoore,項目名稱:CS499,代碼行數:18,代碼來源:AppView.php

示例9: initialize

 /**
  * Initialization hook method.
  *
  * For e.g. use this method to load a helper for all views:
  * `$this->loadHelper('Html');`
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     //        $this->loadHelper('Html', ['className' => 'BootstrapUI.Html']);
     //        $this->loadHelper('Form', ['className' => 'BootstrapUI.Form']);
     //        $this->loadHelper('Flash', ['className' => 'BootstrapUI.Flash']);
     //        $this->loadHelper('Paginator', ['className' => 'BootstrapUI.Paginator']);
     $this->eventManager()->dispatch(new Event('Spider.SpiderAppView.initialize', $this));
 }
開發者ID:mohammadsaleh,項目名稱:spider,代碼行數:17,代碼來源:SpiderAppView.php

示例10: initialize

 /**
  * Initialization hook method.
  *
  * For e.g. use this method to load a helper for all views:
  * `$this->loadHelper('Html');`
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     $this->loadHelper('Bool');
     $this->loadHelper('Pretty');
     $this->loadHelper('Html', ['className' => 'BootstrapUI.Html']);
     $this->loadHelper('Form', ['className' => 'BootstrapUI.Form']);
     $this->loadHelper('Flash', ['className' => 'BootstrapUI.Flash']);
     $this->loadHelper('Paginator', ['className' => 'BootstrapUI.Paginator']);
 }
開發者ID:jtsage,項目名稱:TDTracX,代碼行數:18,代碼來源:AppView.php

示例11: initialize

 /**
  * Initialization hook method.
  *
  * For e.g. use this method to load a helper for all views:
  * `$this->loadHelper('Html');`
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     $this->loadHelper('Html', ['className' => 'BootstrapUI.Html']);
     $this->loadHelper('Form', ['className' => 'BootstrapUI.Form']);
     $this->loadHelper('Flash', ['className' => 'BootstrapUI.Flash']);
     $this->loadHelper('Paginator', ['className' => 'BootstrapUI.Paginator']);
     $this->Html->addCrumb('Home', '/');
     $this->Html->addCrumb($this->request->params['controller'], ['controller' => $this->request->params['controller'], 'action' => 'index']);
 }
開發者ID:bolshas,項目名稱:voffice,代碼行數:18,代碼來源:AppView.php

示例12: initialize

 public function initialize()
 {
     parent::initialize();
     $this->loadHelper('Core');
     if ($this->request->params['plugin'] == 'Admin') {
         $this->loadHelper('Form', ['templates' => 'Admin.app_form', 'errorClass' => 'state-error']);
     } elseif (!isset($this->request->params['plugin'])) {
         $this->loadHelper('Form', ['templates' => 'app_form']);
     }
 }
開發者ID:nguyennghiem1205,項目名稱:japan-circle,代碼行數:10,代碼來源:AppView.php

示例13: initialize

 public function initialize()
 {
     parent::initialize();
     $this->loadHelper('Html');
     $this->loadHelper('Form');
     $this->loadHelper('Url');
     $this->loadHelper('Theme');
     $this->loadHelper('Paginator');
     $this->Paginator->templates(['number' => '<li class="pagination-item"><a href="{{url}}">{{text}}</a></li>', 'current' => '<li class="pagination-item active"><a href="{{url}}">{{text}}</a></li>']);
 }
開發者ID:ThreeCMS,項目名稱:ThreeCMS,代碼行數:10,代碼來源:AppView.php

示例14: initialize

 /**
  * Initialization hook method.
  *
  * For e.g. use this method to load a helper for all views:
  * `$this->loadHelper('Html');`
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     $this->loadHelper('AppUi.AppUi');
     $this->loadHelper('Form', ['templates' => 'AppUi.theme_form']);
     $this->loadHelper('Social.Activity');
     $this->loadHelper('Social.Likeable');
     $this->loadHelper('Social.Followable');
     $this->loadHelper('Social.Commentable');
     $this->loadHelper('Text');
 }
開發者ID:eripoll,項目名稱:webiplan,代碼行數:19,代碼來源:AppView.php

示例15: initialize

 /**
  * Initialization hook method.
  *
  * Use this method to add common initialization code like loading helpers.
  *
  * e.g. `$this->loadHelper('Html');`
  *
  * @return void
  */
 public function initialize()
 {
     parent::initialize();
     $this->loadHelper('Html', ['className' => 'AppHtml', 'App' => \Cake\Core\Configure::read('App')]);
     $this->loadHelper('Form', ['className' => 'Form', 'templates' => ['select' => '<select name="{{name}}"{{attrs}} class="form-control">{{content}}</select>', 'dateWidget' => '<ul class="list-inline"><li class="year">{{year}}</li><li class="month">{{month}}</li><li class="day">{{day}}</li></ul>', 'help' => '<p class="help-block"><i class="fa fa-info-circle"></i> {{content}}</p>']]);
     $this->loadHelper('Flash', ['className' => 'BootstrapUI.Flash', 'element' => 'Flash/default']);
     //        $this->loadHelper('Paginator', ['className' => 'BootstrapUI.Paginator']);
     $this->loadHelper('Gravatar.Gravatar');
     $this->loadHelper('Tanuck/Markdown.Markdown', ['parser' => 'GithubMarkdown']);
     $this->Paginator->templates(['sort' => '<a href="{{url}}" class="{{class}}"><span class="fa fa-fw fa-sort"></span>&nbsp;{{text}}</a>', 'sortAsc' => '<a href="{{url}}" class="{{class}}"><span class="fa fa-fw fa-sort-amount-desc"></span>&nbsp;{{text}}</a>', 'sortDesc' => '<a href="{{url}}" class="{{class}}"><span class="fa fa-fw fa-sort-amount-asc"></span>&nbsp;{{text}}</a>', 'sortAscLocked' => '<a href="{{url}}" class="{{class}}"><span class="fa fa-fw fa-sort-amount-asc"></span>&nbsp;{{text}}</a>', 'sortDescLocked' => '<a href="{{url}}" class="{{class}}"><span class="fa fa-fw fa-sort-amount-desc"></span>&nbsp;{{text}}</a>']);
 }
開發者ID:el-cms,項目名稱:elabs,代碼行數:20,代碼來源:AppView.php


注:本文中的Cake\View\View::initialize方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。