当前位置: 首页>>代码示例>>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;未经允许,请勿转载。