< Manual:Hooks
| ApiOptions | |
|---|---|
| Available from version 1.33.0 (Gerrit change 447730) Called by action=options before applying changes to user preferences. | |
| Define function: | public static function onApiOptions( ApiOptions $apiModule, User $user, array $changes, array $resetKinds ) { ... }
|
| Attach hook: | In extension.json:
{
"Hooks": {
"ApiOptions": "MyExtensionHooks::onApiOptions"
}
}
|
| Called from: | File(s): api/ApiOptions.php Function(s): execute |
| Interface: | ApiOptionsHook.php |
For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:ApiOptions extensions.
Details
$apiModule: Calling ApiOptions object$user: User object whose preferences are being changed$changes: Associative array of preference name => value$resetKinds: Array of strings specifying which options kinds to reset. SeeUser::resetOptions()andUser::getOptionKinds()for possible values.
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.