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


PHP modExtraManagerController::loadCustomCssJs方法代碼示例

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


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

示例1: loadCustomCssJs

 function loadCustomCssJs()
 {
     parent::loadCustomCssJs();
     $attrs = $this->modx->user->getAttributes(array(), '', true);
     $policies = array();
     if (!empty($attrs['modAccessContext']['mgr'])) {
         foreach ($attrs['modAccessContext']['mgr'] as $attr) {
             foreach ($attr['policy'] as $policy => $value) {
                 if (empty($policies[$policy])) {
                     $policies[$policy] = $value;
                 }
             }
         }
     }
     $this->modx->regClientStartupScript('<script type="text/javascript">
         Shop.policies = ' . $this->modx->toJSON($policies) . ';
     </script>', true);
     /*$this->addJavascript($this->getOption('assets_url').'js/shop.js'); 
       
       
       
       $this->addHtml('<script type="text/javascript">
           Shop.config = '. $this->modx->toJSON($this->config).';
       </script>');*/
     return;
 }
開發者ID:Tramp1357,項目名稱:wood,代碼行數:26,代碼來源:index.class.php

示例2: loadCustomCssJs

 function loadCustomCssJs()
 {
     parent::loadCustomCssJs();
     # $this->addJavascript($this->getOption('assets_url').'js/samplepackage.js');
     $this->addHtml('<script type="text/javascript">
   ' . $this->module_name . '.config = ' . $this->modx->toJSON($this->config) . ';
 </script>');
     return;
 }
開發者ID:MODX-Club,項目名稱:modRedirect,代碼行數:9,代碼來源:index.class.php

示例3: loadCustomCssJs

 function loadCustomCssJs()
 {
     parent::loadCustomCssJs();
     $this->addJavascript($this->getOption('assets_url') . 'js/modxsdk.js');
     $this->addHtml('<script type="text/javascript">
         modxSDK.config = ' . $this->modx->toJSON($this->config) . ';
     </script>');
     return;
 }
開發者ID:Tramp1357,項目名稱:atlasorg,代碼行數:9,代碼來源:index.class.php

示例4: loadCustomCssJs

 function loadCustomCssJs()
 {
     parent::loadCustomCssJs();
     $mgrUrl = $this->modx->getOption('manager_url', null, MODX_MANAGER_URL);
     $this->modx->regClientStartupScript($mgrUrl . 'assets/modext/widgets/element/modx.panel.tv.renders.js');
     $assets_url = $this->getOption('assets');
     $this->addJavascript($assets_url . 'js/core/shopmodxgroupedit.js');
     $this->addHtml('<script type="text/javascript">
         shopModxGroupEdit.config = ' . $this->modx->toJSON($this->config) . ';
     </script>');
     return;
 }
開發者ID:Tramp1357,項目名稱:atlasorg,代碼行數:12,代碼來源:index.class.php

示例5: loadCustomCssJs

 function loadCustomCssJs()
 {
     parent::loadCustomCssJs();
     $assets_url = $this->getOption('assets_url');
     $this->modx->regClientStartupScript($assets_url . "js/modHybridAuth.js");
     $this->modx->regClientStartupScript($assets_url . "js/widgets/panel.js");
     $attrs = $this->modx->user->getAttributes(array(), '', true);
     $policies = array();
     if (!empty($attrs['modAccessContext']['mgr'])) {
         foreach ($attrs['modAccessContext']['mgr'] as $attr) {
             foreach ($attr['policy'] as $policy => $value) {
                 if (empty($policies[$policy])) {
                     $policies[$policy] = $value;
                 }
             }
         }
     }
     $this->modx->regClientStartupScript('<script type="text/javascript">
         modHybridAuth.policies = ' . $this->modx->toJSON($policies) . ';
     </script>', true);
     return;
 }
開發者ID:bendasvadim,項目名稱:NewsModxBox,代碼行數:22,代碼來源:index.class.php


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