MediaWiki REL1_35
MediaWiki\ChangeTags\Hook\ChangeTagCanDeleteHook Interface Reference

Stable to implement. More...

Inheritance diagram for MediaWiki\ChangeTags\Hook\ChangeTagCanDeleteHook:

Public Member Functions

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

Detailed Description

Stable to implement.

Definition at line 12 of file ChangeTagCanDeleteHook.php.

Member Function Documentation

◆ onChangeTagCanDelete()

MediaWiki\ChangeTags\Hook\ChangeTagCanDeleteHook::onChangeTagCanDelete (   $tag,
  $user,
$status 
)

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

The default is that tags defined using the ListDefinedTags hook are not allowed to be deleted unless specifically allowed. Ensure you consume the ChangeTagAfterDelete hook to carry out custom deletion actions.

Since
1.35
Parameters
string$tagName of the tag
User$userUser initiating the action
Status&$statusTo allow deletion of the tag, set $status = Status::newGood(), and then return false from the hook function.
Returns
bool|void True or no return value to continue or false to allow deletion of the tag

Implemented in MediaWiki\HookContainer\HookRunner.


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