MediaWiki REL1_37
|
Public Member Functions | |
__construct (HookContainer $container) | |
onResourceLoaderForeignApiModules (&$dependencies, $context) | |
Add dependencies to the mediawiki.ForeignApi module when you wish to override its behavior. | |
onResourceLoaderRegisterModules (ResourceLoader $rl) | |
This hook is called right before modules information is required, such as when responding to a resource loader request or generating HTML output. | |
onResourceLoaderSiteModulePages ( $skin, array &$pages) | |
Change which wiki pages comprise the site module in given skin. | |
onResourceLoaderSiteStylesModulePages ( $skin, array &$pages) | |
Change which wiki pages comprise the site.styles module in given skin. | |
onResourceLoaderTestModules (array &$testModules, ResourceLoader $rl) | |
Use this hook to register ResourceLoader modules that are only available when $wgEnableJavaScriptTest is true. | |
Private Attributes | |
HookContainer | $container |
Definition at line 12 of file HookRunner.php.
MediaWiki\ResourceLoader\HookRunner::__construct | ( | HookContainer | $container | ) |
Definition at line 22 of file HookRunner.php.
References MediaWiki\ResourceLoader\HookRunner\$container.
MediaWiki\ResourceLoader\HookRunner::onResourceLoaderForeignApiModules | ( | & | $dependencies, |
$context | |||
) |
Add dependencies to the mediawiki.ForeignApi
module when you wish to override its behavior.
See the JS docs for more information.
This hook is called from ResourceLoaderForeignApiModule.
string[] | &$dependencies | List of modules that mediawiki.ForeignApi should depend on |
ResourceLoaderContext | null | $context |
Implements MediaWiki\ResourceLoader\Hook\ResourceLoaderForeignApiModulesHook.
Definition at line 26 of file HookRunner.php.
MediaWiki\ResourceLoader\HookRunner::onResourceLoaderRegisterModules | ( | ResourceLoader | $rl | ) |
This hook is called right before modules information is required, such as when responding to a resource loader request or generating HTML output.
ResourceLoader | $rl |
Implements MediaWiki\ResourceLoader\Hook\ResourceLoaderRegisterModulesHook.
Definition at line 34 of file HookRunner.php.
MediaWiki\ResourceLoader\HookRunner::onResourceLoaderSiteModulePages | ( | $skin, | |
array & | $pages | ||
) |
Change which wiki pages comprise the site
module in given skin.
This hook is called from ResourceLoaderSiteModule.
string | $skin | Current skin key |
array | &$pages | Array of pages and their types |
Implements MediaWiki\ResourceLoader\Hook\ResourceLoaderSiteModulePagesHook.
Definition at line 42 of file HookRunner.php.
MediaWiki\ResourceLoader\HookRunner::onResourceLoaderSiteStylesModulePages | ( | $skin, | |
array & | $pages | ||
) |
Change which wiki pages comprise the site.styles
module in given skin.
This hook is called from ResourceLoaderSiteStylesModule.
string | $skin | Current skin key |
array | &$pages | Array of pages and their types |
Implements MediaWiki\ResourceLoader\Hook\ResourceLoaderSiteStylesModulePagesHook.
Definition at line 50 of file HookRunner.php.
MediaWiki\ResourceLoader\HookRunner::onResourceLoaderTestModules | ( | array & | $testModules, |
ResourceLoader | $rl | ||
) |
Use this hook to register ResourceLoader modules that are only available when $wgEnableJavaScriptTest is true.
Use this for test suites and other test-only resources.
array | &$testModules | One array of modules per test framework. The modules array follows the same format as $wgResourceModules . For example: $testModules['qunit']['ext.Example.test'] = [ 'localBasePath' => DIR . '/tests/qunit', 'remoteExtPath' => 'Example/tests/qunit', 'script' => [ 'tests/qunit/foo.js' ], 'dependencies' => [ 'ext.Example.foo' ] ]; |
ResourceLoader | $rl |
Implements MediaWiki\ResourceLoader\Hook\ResourceLoaderTestModulesHook.
Definition at line 58 of file HookRunner.php.
|
private |
Definition at line 20 of file HookRunner.php.
Referenced by MediaWiki\ResourceLoader\HookRunner\__construct().