Manual:Hooks/PageSaveComplete

PageSaveComplete
Available from version 1.35.0 (Gerrit change 601099)
After an article has been updated.
Define function:
public static function onPageSaveComplete( WikiPage $wikiPage, MediaWiki\User\UserIdentity $user, string $summary, int $flags, MediaWiki\Revision\RevisionRecord $revisionRecord, MediaWiki\Storage\EditResult $editResult ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"PageSaveComplete": "MediaWiki\\Extension\\MyExtension\\Hooks::onPageSaveComplete"
	}
}
Called from: File(s): Storage/PageUpdater.php
Interface: PageSaveCompleteHook.php

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


Details edit

  • $wikiPage: WikiPage that was modified
  • $user: user performing the modification
  • $summary: edit summary/comment
  • $flags: EDIT_… flags passed to WikiPage::doEditContent()
  • $revisionRecord: new MediaWiki\Revision\RevisionRecord of the article
  • $editResult: object storing information about the effects of this edit, including which edits were reverted and which edit is this based on (for reverts and null edits). See also $wgManualRevertSearchRadius.
  • Return value: return false to stop other hook handlers from being called; save cannot be aborted.

See also edit