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 "PageUndelete" to register handlers implementing this interface.
13 * @stable to implement
16 interface PageUndeleteHook
{
18 * This hook is called before (part of) a page is undeleted.
22 * @param ProperPageIdentity $page Page being undeleted.
23 * @param Authority $performer Who is undeleting the page
24 * @param string $reason Reason the page is being undeleted
25 * @param bool $unsuppress Whether content is being unsuppressed or not
26 * @param string[] $timestamps Timestamps of revisions that we're going to undelete. If empty, means all revisions.
27 * @param int[] $fileVersions Versions of a file that we're going to undelete. If empty, means all versions.
28 * @param StatusValue $status Add any error here.
29 * @return bool|void True or no return value to continue; false to abort, which also requires adding
30 * a fatal error to $status.
32 public function onPageUndelete(
33 ProperPageIdentity
$page,