Localisation updates from https://translatewiki.net.
[mediawiki.git] / includes / content / Hook / JsonValidateSaveHook.php
blobdd8c3a0ff6c82ce17bb54ea61f0e63a5c9a797c2
1 <?php
3 namespace MediaWiki\Content\Hook;
5 use MediaWiki\Content\JsonContent;
6 use MediaWiki\Page\PageIdentity;
7 use StatusValue;
9 /**
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
14 * @ingroup Hooks
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.
22 * @since 1.39
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 );