本文整理匯總了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;
}