MediaWiki  master
Page\Hook\ArticleDeleteHook Interface Reference

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

Inheritance diagram for Page\Hook\ArticleDeleteHook:

Public Member Functions

 onArticleDelete (WikiPage $wikiPage, User $user, &$reason, &$error, Status &$status, $suppress)
 This hook is called before an article is deleted. More...
 

Detailed Description

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

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

Stable to implement

Definition at line 16 of file ArticleDeleteHook.php.

Member Function Documentation

◆ onArticleDelete()

Page\Hook\ArticleDeleteHook::onArticleDelete ( WikiPage  $wikiPage,
User  $user,
$reason,
$error,
Status $status,
  $suppress 
)

This hook is called before an article is deleted.

Since
1.35
Parameters
WikiPage$wikiPageWikiPage being deleted
User$userUser deleting the article
string&$reasonReason the article is being deleted
string&$errorIf the deletion was prohibited, the (raw HTML) error message to display (added in 1.13)
Status&$statusModify this to throw an error. Overridden by $error (added in 1.20)
bool$suppressWhether this is a suppression deletion or not (added in 1.27)
Returns
bool|void True or no return value to continue or false to abort

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