Jump to content

Manual:Hooks/RollbackComplete

From mediawiki.org
RollbackComplete
Available from version 1.35.0 (Gerrit change 589823)
Occurs after an article rollback is completed
Define function:
public static function onRollbackComplete( WikiPage $wikiPage, MediaWiki\User\UserIdentity $user, MediaWiki\Revision\RevisionRecord $revision, MediaWiki\Revision\RevisionRecord $current ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"RollbackComplete": "MediaWiki\\Extension\\MyExtension\\Hooks::onRollbackComplete"
	}
}
Called from: File(s): page/WikiPage.php
Interface: RollbackCompleteHook.php

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


Details

[edit]
  • $wikiPage: the WikiPage instance that was edited
  • $user: MediaWiki\User\UserIdentity for the user who did the rollback
  • $revision: MediaWiki\Revision\RevisionRecord for the revision the page was reverted back to
  • $current: MediaWiki\Revision\RevisionRecord for the reverted revision