wiki.techinc.nl/includes/Storage/Hook/MultiContentSaveHook.php
Amir Sarabadani f4e68e055f Reorg: Move Status to MediaWiki\Status\
This class is used heavily basically everywhere, moving it to Utils
wouldn't make much sense. Also with this change, we can move
StatusValue to MediaWiki\Status as well.

Bug: T321882
Depends-On: I5f89ecf27ce1471a74f31c6018806461781213c3
Change-Id: I04c1dcf5129df437589149f0f3e284974d7c98fa
2023-08-25 15:44:17 +02:00

41 lines
1.5 KiB
PHP

<?php
namespace MediaWiki\Storage\Hook;
use MediaWiki\CommentStore\CommentStoreComment;
use MediaWiki\Revision\RenderedRevision;
use MediaWiki\Status\Status;
use MediaWiki\User\UserIdentity;
/**
* This is a hook handler interface, see docs/Hooks.md.
* Use the hook name "MultiContentSave" to register handlers implementing this interface.
*
* @stable to implement
* @ingroup Hooks
*/
interface MultiContentSaveHook {
/**
* This hook is called before an article is saved.
*
* @since 1.35
*
* @param RenderedRevision $renderedRevision Planned 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.
* @param UserIdentity $user Author of this new revision
* @param CommentStoreComment $summary User-provided edit comment/summary
* (not an autosummary: will be empty if the user hasn't provided a comment)
* @param int $flags Combination of EDIT_* flags, e.g. EDIT_MINOR
* @param Status $status If the hook is aborted, error code can be placed into this Status
* @return bool|void True or no return value to continue or false to abort
*/
public function onMultiContentSave( $renderedRevision, $user, $summary, $flags,
$status
);
}