Jump to content

Manual:Hooks/ApiMain::moduleManager

From mediawiki.org
ApiMain::moduleManager
Available from version 1.25.0 (Gerrit change 190140)
can be used to conditionally register API modules
Define function:
public static function onApiMain_moduleManager( ApiModuleManager $moduleManager ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"ApiMain::moduleManager": "MediaWiki\\Extension\\MyExtension\\Hooks::onApiMainmoduleManager"
	}
}
Called from: File(s): api/ApiMain.php
Function(s): __construct
Interface: ApiMain__moduleManagerHook.php

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


Called when ApiMain has finished initializing its module manager.

Details

[edit]
  • $apiModuleManager: ApiModuleManager instance