3 namespace MediaWiki\Page\Hook
;
6 use MediaWiki\Page\ProperPageIdentity
;
7 use MediaWiki\Permissions\Authority
;
8 use MediaWiki\Revision\RevisionRecord
;
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
17 interface PageUndeleteCompleteHook
{
19 * This hook is called after a page is undeleted.
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,
38 RevisionRecord
$restoredRev,
39 ManualLogEntry
$logEntry,
40 int $restoredRevisionCount,
42 array $restoredPageIds