Proposition that allows to include modules from ar array. Works both on usual page + ajax page

This commit is contained in:
jf-cbd
2025-12-23 14:55:00 +01:00
parent a627f8a471
commit 35d3194e6c
11 changed files with 190 additions and 8 deletions

View File

@@ -135,6 +135,15 @@ interface iUIBlock
*/
public function AddJsFileRelPath(string $sPath);
/**
* Add a JS module file (whole files inclusion + module configuration) to a block
*
* @param array $aModuleConfig relative path of a JS file to add
*
* @return $this
*/
public function AddJsModuleConfigs(array $aModuleConfig);
/**
* Add several JS files to a block.
* Duplicates will not be added.
@@ -145,6 +154,15 @@ interface iUIBlock
*/
public function AddMultipleJsFilesRelPaths(array $aPaths);
/**
* Add several JS modules files to a block.
*
* @param string[] $aModulesConfig
*
* @return mixed
*/
public function AddMultipleJsModulesFilesRelPaths(array $aModulesConfig);
/**
* Add a CSS file to a block (if not already present)
*