Debian Codegraph @

includes/api/Hook/ApiOptionsHook.php

raw symbols SCIP
1 <?php
2
3 namespace MediaWiki\Api\Hook;
4
5 use MediaWiki\Api\ApiOptions;
6 use MediaWiki\User\User;
7
8 /**
9 * This is a hook handler interface, see docs/Hooks.md.
10 * Use the hook name "ApiOptions" to register handlers implementing this interface.
11 *
12 * @stable to implement
13 * @ingroup Hooks
14 */
15 interface ApiOptionsHook {
16 /**
17 * This hook is called by action=options before applying changes to user
18 * preferences.
19 *
20 * @since 1.35
21 *
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
28 */
29 public function onApiOptions( $apiModule, $user, $changes, $resetKinds );
30 }