Manual:Hooks/ApiMain::moduleManager

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": "MyExtensionHooks::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.

DetailsEdit

  • $apiModuleManager: ApiModuleManager instance