本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}