Manual:Hooks/JsonValidateSave
Appearance
From mediawiki.org
| JsonValidateSave | |
|---|---|
| Available from version 1.39.0 (Gerrit change 822733) Use this hook to add additional validations for JSON content pages. | |
| Define function: | public static function onJsonValidateSave( JsonContent $content, PageIdentity $pageIdentity, StatusValue $status ) { ... } |
| Attach hook: | In extension.json:
{ "Hooks":{ "JsonValidateSave":"MediaWiki\\Extension\\MyExtension\\Hooks::onJsonValidateSave" } } |
| Called from: | File(s): content/JsonContentHandler.php Function(s): validateSave |
| Interface: | JsonValidateSaveHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:JsonValidateSave extensions.
Details
[edit ]This hook is only called if JSON syntax validity and other contentmodel-specific validations are passing.