Manual:Hooks/APIGetAllowedParams

Category:MediaWiki hooks#APIGetAllowedParams Category:Hooks added in MediaWiki 1.14.0#APIGetAllowedParams
APIGetAllowedParams
Available from version 1.14.0
Use this hook to modify an API module's parameters
Define function:
public static function onAPIGetAllowedParams( ApiBase $module, array &$params, int $flags ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"APIGetAllowedParams": "MediaWiki\\Extension\\MyExtension\\Hooks::onAPIGetAllowedParams"
	}
}
Called from: File(s): api/ApiBase.phpCategory:MediaWiki hooks included in ApiBase.php#APIGetAllowedParams
Interface: APIGetAllowedParamsHook.php

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

Details

  • $module: ApiBase object
  • $params: Array of parameters
  • $flags: int zero or OR-ed flags like ApiBase::GET_VALUES_FOR_HELP
Category:Hooks added in MediaWiki 1.14.0 Category:MediaWiki hooks Category:MediaWiki hooks included in ApiBase.php