MediaWiki  master
MediaWiki\ChangeTags\Hook\ChangeTagsAllowedAddHook Interface Reference

This is a hook handler interface, see docs/Hooks.md. More...

Inheritance diagram for MediaWiki\ChangeTags\Hook\ChangeTagsAllowedAddHook:

Public Member Functions

 onChangeTagsAllowedAdd (&$allowedTags, $addTags, $user)
 This hook is called when checking if a user can add tags to a change. More...
 

Detailed Description

This is a hook handler interface, see docs/Hooks.md.

Use the hook name "ChangeTagsAllowedAdd" to register handlers implementing this interface.

Stable to implement

Definition at line 14 of file ChangeTagsAllowedAddHook.php.

Member Function Documentation

◆ onChangeTagsAllowedAdd()

MediaWiki\ChangeTags\Hook\ChangeTagsAllowedAddHook::onChangeTagsAllowedAdd ( $allowedTags,
  $addTags,
  $user 
)

This hook is called when checking if a user can add tags to a change.

Since
1.35
Parameters
string[]&$allowedTagsList of all the tags the user is allowed to add. Any tags the user wants to add ($addTags) that are not in this array will cause it to fail. You may add or remove tags to this array as required.
string[]$addTagsList of tags user intends to add
User$userUser who is adding the tags
Returns
bool|void True or no return value to continue or false to abort

Implemented in MediaWiki\HookContainer\HookRunner.


The documentation for this interface was generated from the following file: