Jump to content

Manual:Hooks/UndeleteForm::undelete

From mediawiki.org
UndeleteForm::undelete
Available from version 1.18.0 (r88235, codereview)
Removed in version 1.38.0 (Gerrit change 724213)
Called un UndeleteForm::undelete, after checking that the site is not in read-only mode, that the Title object is not null and after a PageArchive object has been constructed but before performing any further processing.
Define function:
public static function onUndeleteForm_undelete( &$archive, $title ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"UndeleteForm::undelete": "MediaWiki\\Extension\\MyExtension\\Hooks::onUndeleteFormundelete"
	}
}
Called from: File(s): SpecialUndelete.php
Interface: UndeleteForm__undeleteHook.php

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


Details

[edit]
  • &$archive: PageArchive object
  • $title: Title object of the page that we're viewing