Manual:Hooks/APIGetDescriptionMessages

From mediawiki.org
Jump to navigation Jump to search
APIGetDescriptionMessages
Available from version 1.25.0 (Gerrit change 160798)
Allows to modify a module's help message
Define function:
public static function onAPIGetDescriptionMessages( ApiBase $module, array &$messages ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"APIGetDescriptionMessages": "MyExtensionHooks::onAPIGetDescriptionMessages"
	}
}
Called from:File(s): api/ApiBase.php
Function(s): getFinalDescription
Interface:APIGetDescriptionMessagesHook.php

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

Details[edit]

  • $module - The ApiBase object
  • &$messages - Array of Message objects