< Manual:Hooks
| 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": "MyExtensionHooks::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
$wikiPage:WikiPagethat was modified$user: user performing the modification$summary: edit summary/comment$flags: EDIT_… flags passed toWikiPage::doEditContent()$revisionRecord: newMediaWiki\Revision\RevisionRecordof 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
falseto stop other hook handlers from being called; save cannot be aborted.
See also
- PageContentSaveComplete: legacy hook, deprecated in favor of this one
- PageContentInsertComplete: legacy hook, deprecated in favor of this one
- MultiContentSave
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.