Manual:Hooks/APIAfterExecute

From Linux Web Expert

APIAfterExecute
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate>
Use this hook to extend core API modules
<translate> Define function:</translate>
public static function onAPIAfterExecute( ApiBase $module ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"APIAfterExecute": "MediaWiki\\Extension\\MyExtension\\Hooks::onAPIAfterExecute"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> api/ApiMain.php
<translate> Interface:</translate> APIAfterExecuteHook.php

<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:APIAfterExecute extensions</tvar>.</translate>

Details

  • $module: Module object

Notes

Called after calling the execute() method of an API module.

Use this to extend core API modules.