< Manual:Hooks
PageUndeleteComplete
Available from version 1.40.0
Occurs after the undelete page request has been processed
Define function:
public static function onPageUndeleteComplete( MediaWiki\Page\ProperPageIdentity $page, MediaWiki\Permissions\Authority $restorer, string $reason, MediaWiki\Revision\RevisionRecord $restoredRev, ManualLogEntry $logEntry, int $restoredRevisionCount, bool $created, array $restoredPageIds ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"PageUndeleteComplete": "MyExtensionHooks::onPageUndeleteComplete"
	}
}
Called from: File(s): page/UndeletePage.php
Interface: PageUndeleteCompleteHook.php

For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:PageUndeleteComplete extensions.

Details

  • $page: page that was undeleted.
  • $restorer: who undeleted the page
  • $reason: reason the page was undeleted
  • $restoredRev: last revision of the undeleted page
  • $logEntry: log entry generated by the restoration
  • $restoredRevisionCount: number of revisions restored during the deletion
  • $created: whether the undeletion result in a page being created
  • $restoredPageIds: array of all undeleted page IDs. This will have multiple page IDs if there was more than one deleted page with the same page title.

See also

  • PageUndelete
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.