Manual:Hooks/RevisionDataUpdates
From Linux Web Expert
RevisionDataUpdates | |
---|---|
<translate> Available from <tvar name=1><translate> version <tvar (Gerrit change 418134)</tvar></translate> Called when constructing a list of DeferrableUpdate to be executed to record secondary data about a revision. | |
<translate> Define function:</translate> | public static function onRevisionDataUpdates( Title $title, \MediaWiki\Revision\RenderedRevision $renderedRevision, array &$updates ) { ... }
|
<translate> Attach hook:</translate> | <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
"Hooks": {
"RevisionDataUpdates": "MediaWiki\\Extension\\MyExtension\\Hooks::onRevisionDataUpdates"
}
}
|
<translate> Called from:</translate> | <translate> File(s):</translate> Storage/DerivedPageDataUpdater.php <translate> Function(s):</translate> getSecondaryDataUpdates |
<translate> Interface:</translate> | RevisionDataUpdatesHook.php |
<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:RevisionDataUpdates extensions</tvar>.</translate>
Details
$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.