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


PHP View::helpers方法代碼示例

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


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

示例1: baseHelpers

 /**
  * Load base helpers.
  *
  * @param View $view
  */
 public static function baseHelpers(View $view)
 {
     $view->loadHelper('Html', ['className' => 'Union/Core.Html']);
     $view->loadHelper('Union/Core.Document');
     $view->loadHelper('Url', ['className' => 'Union/Core.Url']);
     $view->loadHelper('Form', ['className' => 'Union/Core.Form', 'widgets' => ['_default' => ['Union\\Core\\View\\Widget\\BasicWidget']]]);
     $view->loadHelper('Paginator', ['templates' => 'Union/Core.paginate_tpl']);
     $view->loadHelper('Union/Core.Less');
     $view->loadHelper('Union/Core.Union');
     $view->loadHelper('Union/Core.Assets');
     $view->loadHelper('Union/Core.ToolBar');
     $view->loadHelper('Union/Core.XmlForm');
     if ($view->request->param('prefix') == 'admin') {
         $view->loadHelper('Union/Core.Ace');
         $view->loadHelper('Union/Core.Admin');
         $view->helpers()->get('Paginator')->config(['templates' => 'Union/Core.paginate_tpl_admin']);
     }
 }
開發者ID:Cheren,項目名稱:union,代碼行數:23,代碼來源:HookHelper.php

示例2: __construct

 /**
  * Default Constructor
  *
  * @param \Cake\View\View $View The View this helper is being attached to.
  * @param array $config Configuration settings for the helper.
  */
 public function __construct(View $View, array $config = [])
 {
     $this->_View = $View;
     $this->request = $View->request;
     $this->config($config);
     if (!empty($this->helpers)) {
         $this->_helperMap = $View->helpers()->normalizeArray($this->helpers);
     }
     $this->initialize($config);
 }
開發者ID:MillHidden,項目名稱:BiellesMeusiennes,代碼行數:16,代碼來源:Helper.php


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