Manual:Hooks/RevisionRecordInserted
From Linux Web Expert
RevisionRecordInserted | |
---|---|
<translate> Available from <tvar name=1><translate> version <tvar (Gerrit change 374077)</tvar></translate> Called after a revision is inserted into the database. | |
<translate> Define function:</translate> | public static function onRevisionRecordInserted( MediaWiki\Storage\RevisionRecord $revisionRecord ) { ... }
|
<translate> Attach hook:</translate> | <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
"Hooks": {
"RevisionRecordInserted": "MediaWiki\\Extension\\MyExtension\\Hooks::onRevisionRecordInserted"
}
}
|
<translate> Called from:</translate> | <translate> File(s):</translate> Revision/RevisionStore.php <translate> Function(s):</translate> insertRevisionOn |
<translate> Interface:</translate> | RevisionRecordInsertedHook.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:RevisionRecordInserted extensions</tvar>.</translate>
Details
- $revisionRecord: the RevisionRecord that has just been inserted.