Collection of requirejs related methods.
More...
|
static | find_all_amd_modules ($unused=false, $includelazy=false) |
| Scan the source for AMD modules and return them all.
|
|
static | find_one_amd_module ($component, $jsfilename, $unused=false) |
| Check a single module exists and return the full path to it.
|
|
Collection of requirejs related methods.
- Copyright
- 2015 Damyon Wiese damyo.nosp@m.n@mo.nosp@m.odle..nosp@m.com
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ find_all_amd_modules()
static core_requirejs::find_all_amd_modules |
( |
| $unused = false, |
|
|
| $includelazy = false ) |
|
static |
Scan the source for AMD modules and return them all.
The expected location for amd modules is: <componentdir>/amd/src/modulename.js
- Parameters
-
boolean | $unused | |
boolean | $includelazy | If true, includes modules with the -lazy suffix. |
- Return values
-
array\$files | An array of mappings from module names to file paths. |
◆ find_one_amd_module()
static core_requirejs::find_one_amd_module |
( |
| $component, |
|
|
| $jsfilename, |
|
|
| $unused = false ) |
|
static |
Check a single module exists and return the full path to it.
The expected location for amd modules is: <componentdir>/amd/src/modulename.js
- Parameters
-
string | $component | The component determines the folder the js file should be in. |
string | $jsfilename | The filename for the module (with the js extension). |
bool | $unused | |
- Return values
-
array\$files | An array of mappings from module names to file paths. Empty array if the file does not exist. |
The documentation for this class was generated from the following file: