< Manual:Hooks
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": "MyExtensionHooks::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

This hook is only called if JSON syntax validity and other contentmodel-specific validations are passing.

This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.