Debian Codegraph @

includes/page/Hook/PageUndeleteHook.php

raw symbols SCIP
1 <?php
2
3 namespace MediaWiki\Page\Hook;
4
5 use MediaWiki\Page\ProperPageIdentity;
6 use MediaWiki\Permissions\Authority;
7 use StatusValue;
8
9 /**
10 * This is a hook handler interface, see docs/Hooks.md.
11 * Use the hook name "PageUndelete" to register handlers implementing this interface.
12 *
13 * @stable to implement
14 * @ingroup Hooks
15 */
16 interface PageUndeleteHook {
17 /**
18 * This hook is called before (part of) a page is undeleted.
19 *
20 * @since 1.37
21 *
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.
31 */
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
40 );
41 }