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