3 namespace MediaWiki\Content\Hook
;
5 use MediaWiki\Content\JsonContent
;
6 use MediaWiki\Page\PageIdentity
;
10 * This is a hook handler interface, see docs/Hooks.md.
11 * Use the hook name "JsonValidateSaveHook" to register handlers implementing this interface.
13 * @stable to implement
16 interface JsonValidateSaveHook
{
18 * Use this hook to add additional validations for JSON content pages.
19 * This hook is only called if JSON syntax validity and other contentmodel-specific validations
24 * @param JsonContent $content
25 * @param PageIdentity $pageIdentity
26 * @param StatusValue $status Fatal errors only would trigger validation failure as $status is checked with isOK()
27 * @return bool|void True or no return value to continue
29 public function onJsonValidateSave( JsonContent
$content, PageIdentity
$pageIdentity, StatusValue
$status );