Manual:Hooks/ResourceLoaderForeignApiModules

ResourceLoaderForeignApiModules
Available from version 1.26.0 (Gerrit change 231710)
Called from ResourceLoaderForeignApiModule. Use this to add dependencies to 'mediawiki.ForeignApi' module when you wish to override its behavior. See the module docs for more information.
Define function:
public static function onResourceLoaderForeignApiModules( &$dependencies, $context ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"ResourceLoaderForeignApiModules": "MediaWiki\\Extension\\MyExtension\\Hooks::onResourceLoaderForeignApiModules"
	}
}
Called from: File(s): ResourceLoaderForeignApiModule.php
Function(s): getDependencies
Interface: ResourceLoaderForeignApiModulesHook.php

For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:ResourceLoaderForeignApiModules extensions.


Details

edit
  • &$dependencies: string[] List of modules that 'mediawiki.ForeignApi' should depend on
  • $context: ResourceLoaderContext|null