Jump to content

Manual:Hooks/RevisionDataUpdates

From mediawiki.org
RevisionDataUpdates
Available from version 1.32.0 (Gerrit change 418134)
Called when constructing a list of DeferrableUpdate to be executed to record secondary data about a revision.
Define function:
public static function onRevisionDataUpdates( Title $title, \MediaWiki\Revision\RenderedRevision $renderedRevision, array &$updates ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"RevisionDataUpdates": "MediaWiki\\Extension\\MyExtension\\Hooks::onRevisionDataUpdates"
	}
}
Called from: File(s): Storage/DerivedPageDataUpdater.php
Function(s): getSecondaryDataUpdates
Interface: RevisionDataUpdatesHook.php

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


Details

[edit]
  • $title: The Title of the page the revision belongs to
  • $renderedRevision: a MediaWiki\Revision\RenderedRevision object representing the new revision and providing access to the RevisionRecord as well as ParserOutput of that revision.
  • &$updates: A list of DeferrableUpdate objects that can be manipulated by the hook handler.

See also

[edit]