Manual:Hooks/PageUndeleteComplete
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": "MediaWiki\\Extension\\MyExtension\\Hooks::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
edit$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.