Merge ".mailmap: Correct two contributor names"
[mediawiki.git] / includes / page / Hook / PageUndeleteHook.php
blobb28b3fbda19140fc15bca6db283033624366b817
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 "PageUndelete" to register handlers implementing this interface.
13 * @stable to implement
14 * @ingroup Hooks
16 interface PageUndeleteHook {
17 /**
18 * This hook is called before (part of) a page is undeleted.
20 * @since 1.37
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,
34 Authority $performer,
35 string $reason,
36 bool $unsuppress,
37 array $timestamps,
38 array $fileVersions,
39 StatusValue $status