Follows-up f5aaf75ad1.
* Improve some docs for these hooks.
* Add type hints.
* Add them as a subgroup within the ResourceLoader docgroup
for easy navigation.
Bug: T246855
Change-Id: I52f31e2b63dcf265b27e68ba8fd4f885d82088ac
25 lines
735 B
PHP
25 lines
735 B
PHP
<?php
|
|
|
|
namespace MediaWiki\ResourceLoader\Hook;
|
|
|
|
use ResourceLoaderContext;
|
|
|
|
/**
|
|
* @stable for implementation
|
|
* @ingroup ResourceLoaderHooks
|
|
*/
|
|
interface ResourceLoaderForeignApiModulesHook {
|
|
/**
|
|
* 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.
|
|
*
|
|
* @since 1.35
|
|
* @param string[] &$dependencies List of modules that mediawiki.ForeignApi should
|
|
* depend on
|
|
* @param ResourceLoaderContext|null $context
|
|
* @return bool|void True or no return value to continue or false to abort
|
|
*/
|
|
public function onResourceLoaderForeignApiModules( &$dependencies, $context );
|
|
}
|