Manual:Hooks/RollbackComplete
This deprecated feature should no longer be used, but is still available for reasons of backwards compatibility. This feature was deprecated in version 1.36.0. This hook was deprecated in Gerrit change 609789.Please see PageSaveComplete for an alternative way to use this feature. |
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
: theWikiPage
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