MediaWiki REL1_39
MediaWiki\Storage\Hook\PageContentSaveHook Interface Reference

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

Inheritance diagram for MediaWiki\Storage\Hook\PageContentSaveHook:

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/

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

since 1.35 Use MultiContentSave instead

Definition at line 18 of file PageContentSaveHook.php.

Member Function Documentation

◆ onPageContentSave()

MediaWiki\Storage\Hook\PageContentSaveHook::onPageContentSave ( $wikiPage,
& $summary,
$status )

This hook is called before an article is saved.

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.
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: