MediaWiki master
MediaWiki\ChangeTags\Hook\ChangeTagCanCreateHook Interface Reference

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

Inherited by MediaWiki\HookContainer\HookRunner.

Public Member Functions

 onChangeTagCanCreate ( $tag, $user, &$status)
 Use this hook to tell whether a change tag should be able to be created from the UI (Special:Tags) or via the API.
 

Detailed Description

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

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

Stability: stable
to implement

Definition at line 15 of file ChangeTagCanCreateHook.php.

Member Function Documentation

◆ onChangeTagCanCreate()

MediaWiki\ChangeTags\Hook\ChangeTagCanCreateHook::onChangeTagCanCreate ( $tag,
$user,
& $status )

Use this hook to tell whether a change tag should be able to be created from the UI (Special:Tags) or via the API.

You could use this hook if you want to reserve a specific "namespace" of tags, or something similar.

Since
1.35
Parameters
string$tagName of the tag
User | null$userUser initiating the action
Status&$statusAdd your errors using $status->fatal() or warnings using $status->warning(). Errors and warnings will be relayed to the user. If you set an error, the user will be unable to create the tag.
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: