Manual:Hooks/ArticleUndeleteLogEntry

From MediaWiki.org
Jump to navigation Jump to search
ArticleUndeleteLogEntry
Available from version 1.21.0 (Gerrit change 33734)
Occurs when a log entry is generated but not yet saved
Define function:
public static function onArticleUndeleteLogEntry( PageArchive $pageArchive, ManualLogEntry $logEntry, User $user ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"ArticleUndeleteLogEntry": "MyExtensionHooks::onArticleUndeleteLogEntry"
	}
}

For MediaWiki ≤1.25:

$wgHooks['ArticleUndeleteLogEntry'][] = 'MyExtensionHooks::onArticleUndeleteLogEntry';
Called from:File(s): page/PageArchive.php
Function(s): undelete

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

Details[edit]

  • $pageArchive: the PageArchive object
  • &$logEntry: ManualLogEntry object
  • $user: User who is performing the log action