Debian Codegraph @

includes/changetags/Hook/ChangeTagsAllowedAddHook.php

raw symbols SCIP
1 <?php
2
3 namespace MediaWiki\ChangeTags\Hook;
4
5 use MediaWiki\User\User;
6
7 /**
8 * This is a hook handler interface, see docs/Hooks.md.
9 * Use the hook name "ChangeTagsAllowedAdd" to register handlers implementing this interface.
10 *
11 * @stable to implement
12 * @ingroup Hooks
13 */
14 interface ChangeTagsAllowedAddHook {
15 /**
16 * This hook is called when checking if a user can add tags to a change.
17 *
18 * @since 1.35
19 *
20 * @param string[] &$allowedTags List of all the tags the user is allowed to add. Any tags the
21 * user wants to add ($addTags) that are not in this array will cause it to fail.
22 * You may add or remove tags to this array as required.
23 * @param string[] $addTags List of tags user intends to add
24 * @param User|null $user User who is adding the tags
25 * @return bool|void True or no return value to continue or false to abort
26 */
27 public function onChangeTagsAllowedAdd( &$allowedTags, $addTags, $user );
28 }