This patch introduces a namespace declaration for the MediaWiki\Content to JsonContent and establishes a class alias marked as deprecated since version 1.43. Bug: T353458 Change-Id: I44abb1ab5bd1fabf9886dc1457e241d7cae068bc
30 lines
940 B
PHP
30 lines
940 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Content\Hook;
|
|
|
|
use MediaWiki\Content\JsonContent;
|
|
use MediaWiki\Page\PageIdentity;
|
|
use StatusValue;
|
|
|
|
/**
|
|
* This is a hook handler interface, see docs/Hooks.md.
|
|
* Use the hook name "JsonValidateSaveHook" to register handlers implementing this interface.
|
|
*
|
|
* @stable to implement
|
|
* @ingroup Hooks
|
|
*/
|
|
interface JsonValidateSaveHook {
|
|
/**
|
|
* Use this hook to add additional validations for JSON content pages.
|
|
* This hook is only called if JSON syntax validity and other contentmodel-specific validations
|
|
* are passing.
|
|
*
|
|
* @since 1.39
|
|
*
|
|
* @param JsonContent $content
|
|
* @param PageIdentity $pageIdentity
|
|
* @param StatusValue $status Fatal errors only would trigger validation failure as $status is checked with isOK()
|
|
* @return bool|void True or no return value to continue
|
|
*/
|
|
public function onJsonValidateSave( JsonContent $content, PageIdentity $pageIdentity, StatusValue $status );
|
|
}
|