Merge "jquery.tablesorter: Silence an expected "sort-rowspan-error" warning"
[mediawiki.git] / includes / api / Hook / ApiOptionsHook.php
blob2294a85165f3c8f2bab70f1d3a87e485dfddac26
1 <?php
3 namespace MediaWiki\Api\Hook;
5 use MediaWiki\Api\ApiOptions;
6 use MediaWiki\User\User;
8 /**
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
13 * @ingroup Hooks
15 interface ApiOptionsHook {
16 /**
17 * This hook is called by action=options before applying changes to user
18 * preferences.
20 * @since 1.35
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 );