Debian Codegraph @

includes/content/Hook/JsonValidateSaveHook.php

raw symbols SCIP
1 <?php
2
3 namespace MediaWiki\Content\Hook;
4
5 use MediaWiki\Content\JsonContent;
6 use MediaWiki\Page\PageIdentity;
7 use 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 */
16 interface 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 }