MediaWiki REL1_39
MediaWiki\Content\Hook\JsonValidateSaveHook Interface Reference

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

Inheritance diagram for MediaWiki\Content\Hook\JsonValidateSaveHook:

Public Member Functions

 onJsonValidateSave (JsonContent $content, PageIdentity $pageIdentity, StatusValue $status)
 Use this hook to add additional validations for JSON content pages.
 

Detailed Description

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

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

Stability: stable
to implement

Definition at line 16 of file JsonValidateSaveHook.php.

Member Function Documentation

◆ onJsonValidateSave()

MediaWiki\Content\Hook\JsonValidateSaveHook::onJsonValidateSave ( JsonContent $content,
PageIdentity $pageIdentity,
StatusValue $status )

Use this hook to add additional validations for JSON content pages.

This hook is only called if JSON syntax validity and other contentmodel-specific validations are passing.

Since
1.39
Parameters
JsonContent$content
PageIdentity$pageIdentity
StatusValue$statusFatal errors only would trigger validation failure as $status is checked with isOK()
Returns
bool|void True or no return value to continue

Implemented in MediaWiki\HookContainer\HookRunner.


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