MediaWiki master
MediaWiki\Storage\Hook\MultiContentSaveHook Interface Reference

This is a hook handler interface, see docs/ More...

Inherited by MediaWiki\HookContainer\HookRunner.

Public Member Functions

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

Detailed Description

This is a hook handler interface, see docs/

Use the hook name "MultiContentSave" to register handlers implementing this interface.

Stability: stable
to implement

Definition at line 17 of file MultiContentSaveHook.php.

Member Function Documentation

◆ onMultiContentSave()

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

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: