Collection of requirejs related methods.
More...
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 |
( |
|
$debug = 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 | $debug | If true, returns the paths to the original (unminified) source files. |
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, |
|
|
|
$debug = 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). |
boolean | $debug | If true, returns the paths to the original (unminified) source files. |
- 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: