MediaWiki REL1_39
|
This is a hook handler interface, see docs/Hooks.md. More...
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. | |
This is a hook handler interface, see docs/Hooks.md.
Use the hook name "ChangeTagCanCreate" to register handlers implementing this interface.
Definition at line 15 of file ChangeTagCanCreateHook.php.
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.
string | $tag | Name of the tag |
User | null | $user | User initiating the action |
Status | &$status | Add 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. |
Implemented in MediaWiki\HookContainer\HookRunner.