Elgg
Version 4.3
|
Control configuration of RequireJS. More...
Public Member Functions | |
__construct (\Elgg\PluginHooksService $hooks) | |
Constructor. More... | |
setBaseUrl ($url) | |
Set the base URL for the site. More... | |
addPath ($name, $path) | |
Add a path mapping for a module. More... | |
removePath ($name, $path=null) | |
Remove a path for a module. More... | |
addShim ($name, array $config) | |
Configures a shimmed module. More... | |
hasShim ($name) | |
Is this shim defined. More... | |
removeShim ($name) | |
Unregister the shim config for a module. More... | |
addDependency ($name) | |
Add a dependency. More... | |
removeDependency ($name) | |
Removes a dependency. More... | |
getDependencies () | |
Get registered dependencies. More... | |
hasDependency ($name) | |
Is this dependency registered. More... | |
addModule ($name, array $config=[]) | |
Adds a standard AMD or shimmed module to the config. More... | |
removeModule ($name) | |
Removes all config for a module. More... | |
hasModule ($name) | |
Is module configured? More... | |
getConfig () | |
Get the configuration of AMD. More... | |
Control configuration of RequireJS.
Definition at line 12 of file Config.php.
Elgg\Amd\Config::__construct | ( | \Elgg\PluginHooksService | $hooks | ) |
Constructor.
\Elgg\PluginHooksService | $hooks | The hooks service |
Definition at line 28 of file Config.php.
Elgg\Amd\Config::addDependency | ( | $name | ) |
Add a dependency.
string | $name | Name of the dependency |
Definition at line 142 of file Config.php.
Elgg\Amd\Config::addModule | ( | $name, | |
array | $config = [] |
||
) |
Adds a standard AMD or shimmed module to the config.
string | $name | The name of the module |
array | $config | Configuration for the module
|
Definition at line 186 of file Config.php.
Elgg\Amd\Config::addPath | ( | $name, | |
$path | |||
) |
Add a path mapping for a module.
If a path is already defined, sets current path as preferred.
string | $name | Module name |
string | $path | Full URL of the module |
Definition at line 50 of file Config.php.
Elgg\Amd\Config::addShim | ( | $name, | |
array | $config | ||
) |
Configures a shimmed module.
string | $name | Module name |
array | $config | Configuration for the module
|
InvalidParameterException |
Definition at line 97 of file Config.php.
Elgg\Amd\Config::getConfig | ( | ) |
Elgg\Amd\Config::getDependencies | ( | ) |
Elgg\Amd\Config::hasDependency | ( | $name | ) |
Is this dependency registered.
string | $name | Module name |
Definition at line 171 of file Config.php.
Elgg\Amd\Config::hasModule | ( | $name | ) |
Is module configured?
string | $name | Module name |
Definition at line 223 of file Config.php.
Elgg\Amd\Config::hasShim | ( | $name | ) |
Is this shim defined.
string | $name | The name of the shim |
Definition at line 122 of file Config.php.
Elgg\Amd\Config::removeDependency | ( | $name | ) |
Removes a dependency.
string | $name | Name of the dependency |
Definition at line 152 of file Config.php.
Elgg\Amd\Config::removeModule | ( | $name | ) |
Removes all config for a module.
string | $name | The module name |
Definition at line 211 of file Config.php.
Elgg\Amd\Config::removePath | ( | $name, | |
$path = null |
|||
) |
Remove a path for a module.
string | $name | Module name |
mixed | $path | The path to remove. If null, removes all paths (default). |
Definition at line 69 of file Config.php.
Elgg\Amd\Config::removeShim | ( | $name | ) |
Unregister the shim config for a module.
string | $name | Module name |
Definition at line 132 of file Config.php.
Elgg\Amd\Config::setBaseUrl | ( | $url | ) |
Set the base URL for the site.
string | $url | URL |
Definition at line 38 of file Config.php.