MediaWiki  master
MediaWiki\Storage\Hook\MultiContentSaveHook Interface Reference

Stable to implement. More...

Inheritance diagram for MediaWiki\Storage\Hook\MultiContentSaveHook:

Public Member Functions

 onMultiContentSave ( $renderedRevision, $user, $summary, $flags, $status)
 This hook is called before an article is saved. More...

Detailed Description

Stable to implement.

Definition at line 14 of file MultiContentSaveHook.php.

Member Function Documentation

◆ onMultiContentSave()

MediaWiki\Storage\Hook\MultiContentSaveHook::onMultiContentSave (   $renderedRevision,

This hook is called before an article is saved.

RenderedRevision$renderedRevisionPlanned revision. Provides access to: (1) ParserOutput of all slots, (2) RevisionRecord, which contains (2a) Title of the page that will be edited, (2b) RevisionSlots - content of all slots, including inherited slots, where content has already been modified by PreSaveTransform. NOTE: because this revision is not yet saved, slots don't have content ID or address, and revision itself doesn't have an ID.
UserIdentity$userAuthor of this new revision
CommentStoreComment$summaryUser-provided edit comment/summary (not an autosummary: will be empty if the user hasn't provided a comment)
int$flagsCombination of EDIT_* flags, e.g. EDIT_MINOR
Status$statusIf the hook is aborted, error code can be placed into this Status
bool|void True or no return value to continue or false to abort

Implemented in MediaWiki\HookContainer\HookRunner.

The documentation for this interface was generated from the following file: