Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3namespace MediaWiki\Content\Hook;
4
5use JsonContent;
6use MediaWiki\Page\PageIdentity;
7use StatusValue;
8
9/**
10 * This is a hook handler interface, see docs/Hooks.md.
11 * Use the hook name "JsonValidateSaveHook" to register handlers implementing this interface.
12 *
13 * @stable to implement
14 * @ingroup Hooks
15 */
16interface JsonValidateSaveHook {
17    /**
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
20     * are passing.
21     *
22     * @since 1.39
23     *
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
28     */
29    public function onJsonValidateSave( JsonContent $content, PageIdentity $pageIdentity, StatusValue $status );
30}