Adds the customcode dispencer class

This commit is contained in:
2022-08-31 13:49:01 +02:00
parent 4928a8baaf
commit abe9b5d227
11 changed files with 739 additions and 330 deletions

View File

@ -754,7 +754,7 @@ class Structure extends Get
$module->add_scripts_field = false;
$field_script_bucket = array();
// add any css from the fields
if (($css = $this->getCustomScriptBuilder(
if (($css = CFactory::_('Customcode.Dispenser')->get(
'css_view', $module->key
)) !== null
&& StringHelper::check($css))
@ -789,7 +789,7 @@ class Structure extends Get
}
}
// add any JavaScript from the fields
if (($javascript = $this->getCustomScriptBuilder(
if (($javascript = CFactory::_('Customcode.Dispenser')->get(
'view_footer', $module->key
)) !== null
&& StringHelper::check($javascript))