3 namespace MediaWiki\Api\Hook
;
5 use MediaWiki\Api\ApiOptions
;
6 use MediaWiki\User\User
;
9 * This is a hook handler interface, see docs/Hooks.md.
10 * Use the hook name "ApiOptions" to register handlers implementing this interface.
12 * @stable to implement
15 interface ApiOptionsHook
{
17 * This hook is called by action=options before applying changes to user
22 * @param ApiOptions $apiModule Calling ApiOptions object
23 * @param User $user User object whose preferences are being changed
24 * @param array $changes Associative array of preference name => value
25 * @param string[] $resetKinds Array of strings specifying which options kinds to reset
26 * See User::resetOptions() and User::getOptionKinds() for possible values.
27 * @return bool|void True or no return value to continue or false to abort
29 public function onApiOptions( $apiModule, $user, $changes, $resetKinds );