MediaWiki master
MediaWiki\Storage\Hook\PageContentSaveHook Interface Reference

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

Inherited by MediaWiki\HookContainer\HookRunner.

Public Member Functions

 onPageContentSave ( $wikiPage, $user, $content, &$summary, $isminor, $iswatch, $section, $flags, $status)
 This hook is called before an article is saved.
 

Detailed Description

This is a hook handler interface, see docs/Hooks.md.

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

Deprecated
since 1.35 Use MultiContentSave instead

Definition at line 18 of file PageContentSaveHook.php.

Member Function Documentation

◆ onPageContentSave()

MediaWiki\Storage\Hook\PageContentSaveHook::onPageContentSave ( $wikiPage,
$user,
$content,
& $summary,
$isminor,
$iswatch,
$section,
$flags,
$status )

This hook is called before an article is saved.

Since
1.35
Parameters
WikiPage$wikiPageWikiPage being saved
User$userUser saving the article
Content$contentNew article content
CommentStoreComment&$summaryEdit comment. Can be replaced with a new one.
bool$isminorWhether the edit was marked as minor
null$iswatchPreviously a watch flag. Currently unused, always null.
null$sectionPreviously the section number being edited. Currently unused, always null.
int$flagsAll EDIT_… flags (including EDIT_MINOR) as an integer number. See WikiPage::doUserEditContent documentation for flags' definition.
StatusValue$statusStatusValue object for the hook handlers resulting status. Either set $status->fatal() or return false to abort the save action.
Returns
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: