MediaWiki  master
MediaWiki\Hook\EditFilterMergedContentHook Interface Reference

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

Inheritance diagram for MediaWiki\Hook\EditFilterMergedContentHook:

Public Member Functions

 onEditFilterMergedContent (IContextSource $context, Content $content, Status $status, $summary, User $user, $minoredit)
 Use this hook for a post-section-merge edit filter. More...
 

Detailed Description

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

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

Stability: stable
to implement

Definition at line 17 of file EditFilterMergedContentHook.php.

Member Function Documentation

◆ onEditFilterMergedContent()

MediaWiki\Hook\EditFilterMergedContentHook::onEditFilterMergedContent ( IContextSource  $context,
Content  $content,
Status  $status,
  $summary,
User  $user,
  $minoredit 
)

Use this hook for a post-section-merge edit filter.

This may be triggered by the EditPage or any other facility that modifies page content. Use the return value to indicate whether the edit should be allowed, and use the $status object to provide a reason for disallowing it. $status->apiHookResult can be set to an array to be returned by api.php action=edit. This is used to deliver captchas.

Since
1.35
Parameters
IContextSource$context
Content$contentContent of the edit box
Status$statusStatus object to represent errors, etc.
string$summaryEdit summary for page
User$userUser whois performing the edit
bool$minoreditWhether the edit was marked as minor by the user.
Returns
bool|void False or no return value with not $status->isOK() to abort the edit and show the edit form, true to continue. But because mutiple triggers of this hook may have different behavior in different version (T273354), you'd better return false and set $status->value to EditPage::AS_HOOK_ERROR_EXPECTED or any other customized value.

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