3 namespace MediaWiki\Page\Hook
;
5 use MediaWiki\Page\ProperPageIdentity
;
6 use MediaWiki\Permissions\Authority
;
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
16 interface PageDeleteHook
{
18 * This hook is called before a page is deleted.
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,