Merge ".mailmap: Correct two contributor names"
[mediawiki.git] / includes / page / Hook / PageDeleteHook.php
blob23f70e32d63f09edde3ceed1ee1f36a62b3bb98f
1 <?php
3 namespace MediaWiki\Page\Hook;
5 use MediaWiki\Page\ProperPageIdentity;
6 use MediaWiki\Permissions\Authority;
7 use StatusValue;
9 /**
10 * This is a hook handler interface, see docs/Hooks.md.
11 * Use the hook name "PageDelete" to register handlers implementing this interface.
13 * @stable to implement
14 * @ingroup Hooks
16 interface PageDeleteHook {
17 /**
18 * This hook is called before a page is deleted.
20 * @since 1.37
22 * @param ProperPageIdentity $page Page being deleted.
23 * @param Authority $deleter Who is deleting the page
24 * @param string $reason Reason the page is being deleted
25 * @param StatusValue $status Add any error here
26 * @param bool $suppress Whether this is a suppression deletion or not
27 * @return bool|void True or no return value to continue; false to abort, which also requires adding
28 * a fatal error to $status.
30 public function onPageDelete(
31 ProperPageIdentity $page,
32 Authority $deleter,
33 string $reason,
34 StatusValue $status,
35 bool $suppress