Manual:Hooks/APIGetResultProperties

From mediawiki.org
APIGetResultProperties
Available from version 1.20.0
Removed in version 1.24.0
Use this hook to modify the properties in a module's result.
Define function:
public static function onAPIGetResultProperties( ApiBase &$module, array &$properties ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"APIGetResultProperties": "MediaWiki\\Extension\\MyExtension\\Hooks::onAPIGetResultProperties"
	}
}
Called from: File(s): api/ApiBase.php
Interface: APIGetResultPropertiesHook.php

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


Details[edit]

  • &$module: ApiBase object
  • &$properties: Array of properties