MediaWiki
REL1_24
|
Public Member Functions | |
__construct ($options=array()) | |
getDependencies () | |
Get a list of modules this module depends on. | |
getGroup () | |
Get the group this module is in. | |
getScript (ResourceLoaderContext $context) | |
Get all JS for this module for a given language and skin. | |
getSkipFunction () | |
Get the skip function. | |
getSource () | |
Get the origin of this module. | |
getStyles (ResourceLoaderContext $context) | |
Get all CSS for this module for a given skin. | |
isRaw () | |
Whether this module's JS expects to work without the client-side ResourceLoader module. | |
Protected Attributes | |
$dependencies = array() | |
$group = null | |
$isRaw = false | |
$script = '' | |
$skipFunction = null | |
$source = 'local' | |
$styles = '' | |
$targets = array( 'test' ) |
Definition at line 42 of file ResourceLoaderTestCase.php.
ResourceLoaderTestModule::__construct | ( | $ | options = array() | ) |
Get a list of modules this module depends on.
Dependency information is taken into account when loading a module on the client side.
To add dependencies dynamically on the client side, use a custom loader script, see getLoaderScript()
Reimplemented from ResourceLoaderModule.
Definition at line 66 of file ResourceLoaderTestCase.php.
Get the group this module is in.
Reimplemented from ResourceLoaderModule.
Definition at line 70 of file ResourceLoaderTestCase.php.
ResourceLoaderTestModule::getScript | ( | ResourceLoaderContext $ | context | ) |
Get all JS for this module for a given language and skin.
Includes all relevant JS except loader scripts.
ResourceLoaderContext | $context |
Reimplemented from ResourceLoaderModule.
Definition at line 58 of file ResourceLoaderTestCase.php.
Get the skip function.
Modules that provide fallback functionality can provide a "skip function". This function, if provided, will be passed along to the module registry on the client. When this module is loaded (either directly or as a dependency of another module), then this function is executed first. If the function returns true, the module will instantly be considered "ready" without requesting the associated module resources.
The value returned here must be valid javascript for execution in a private function. It must not contain the "function () {" and "}" wrapper though.
Reimplemented from ResourceLoaderModule.
Definition at line 78 of file ResourceLoaderTestCase.php.
Get the origin of this module.
Should only be overridden for foreign modules.
Reimplemented from ResourceLoaderModule.
Definition at line 74 of file ResourceLoaderTestCase.php.
References source.
ResourceLoaderTestModule::getStyles | ( | ResourceLoaderContext $ | context | ) |
Get all CSS for this module for a given skin.
ResourceLoaderContext | $context |
Reimplemented from ResourceLoaderModule.
Definition at line 62 of file ResourceLoaderTestCase.php.
References array().
Whether this module's JS expects to work without the client-side ResourceLoader module.
Returning true from this function will prevent mw.loader.state() call from being appended to the bottom of the script.
Reimplemented from ResourceLoaderModule.
Definition at line 82 of file ResourceLoaderTestCase.php.
ResourceLoaderTestModule::$dependencies = array() [protected] |
Definition at line 43 of file ResourceLoaderTestCase.php.
ResourceLoaderTestModule::$group = null [protected] |
Definition at line 44 of file ResourceLoaderTestCase.php.
Definition at line 49 of file ResourceLoaderTestCase.php.
ResourceLoaderTestModule::$script = '' [protected] |
Definition at line 46 of file ResourceLoaderTestCase.php.
ResourceLoaderTestModule::$skipFunction = null [protected] |
Definition at line 48 of file ResourceLoaderTestCase.php.
ResourceLoaderTestModule::$source = 'local' [protected] |
Definition at line 45 of file ResourceLoaderTestCase.php.
ResourceLoaderTestModule::$styles = '' [protected] |
Definition at line 47 of file ResourceLoaderTestCase.php.
ResourceLoaderTestModule::$targets = array( 'test' ) [protected] |
Reimplemented from ResourceLoaderModule.
Definition at line 50 of file ResourceLoaderTestCase.php.