MediaWiki REL1_35
MediaWiki\Page\Hook\ArticleDeleteHook Interface Reference

Stable to implement. More...

Inheritance diagram for MediaWiki\Page\Hook\ArticleDeleteHook:

Public Member Functions

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

Detailed Description

Stable to implement.

Definition at line 13 of file ArticleDeleteHook.php.

Member Function Documentation

◆ onArticleDelete()

MediaWiki\Page\Hook\ArticleDeleteHook::onArticleDelete (   $wikiPage,
  $user,
$reason,
$error,
$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

Implemented in MediaWiki\HookContainer\HookRunner.


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