Merge ".mailmap: Correct two contributor names"
[mediawiki.git] / includes / page / Hook / PageUndeleteCompleteHook.php
blob8942d7b2d5c4993a0369376be7817b9a024fedd7
1 <?php
3 namespace MediaWiki\Page\Hook;
5 use ManualLogEntry;
6 use MediaWiki\Page\ProperPageIdentity;
7 use MediaWiki\Permissions\Authority;
8 use MediaWiki\Revision\RevisionRecord;
10 /**
11 * This is a hook handler interface, see docs/Hooks.md.
12 * Use the hook name "PageUndeleteComplete" to register handlers implementing this interface.
14 * @stable to implement
15 * @ingroup Hooks
17 interface PageUndeleteCompleteHook {
18 /**
19 * This hook is called after a page is undeleted.
21 * @since 1.40
23 * @param ProperPageIdentity $page Page that was undeleted.
24 * @param Authority $restorer Who undeleted the page
25 * @param string $reason Reason the page was undeleted
26 * @param RevisionRecord $restoredRev Last revision of the undeleted page
27 * @param ManualLogEntry $logEntry Log entry generated by the restoration
28 * @param int $restoredRevisionCount Number of revisions restored during the deletion
29 * @param bool $created Whether the undeletion result in a page being created
30 * @param array $restoredPageIds Array of all undeleted page IDs.
31 * This will have multiple page IDs if there was more than one deleted page with the same page title.
32 * @return void This hook must not abort, it must return no value
34 public function onPageUndeleteComplete(
35 ProperPageIdentity $page,
36 Authority $restorer,
37 string $reason,
38 RevisionRecord $restoredRev,
39 ManualLogEntry $logEntry,
40 int $restoredRevisionCount,
41 bool $created,
42 array $restoredPageIds
43 ): void;