Open main menu

Manual:Hooks/APIGetResultProperties

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": "MyExtensionHooks::onAPIGetResultProperties"
	}
}

For MediaWiki ≤1.25:

$wgHooks['APIGetResultProperties'][] = 'MyExtensionHooks::onAPIGetResultProperties';
Called from:File(s): api/ApiBase.php

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

DetailsEdit

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