X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fcontent%2FJsonContentHandler.php;h=edb21f682c3e384abd2770d06f35d4ef5caab639;hb=f9515cf0049a0948c6766e5887d8a1b495e25325;hp=b149f5287dfc2d1a9f879bb35401fe356f4534db;hpb=04fdc78370dbc042116488d6826e19bf3910273b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/content/JsonContentHandler.php b/includes/content/JsonContentHandler.php index b149f5287d..edb21f682c 100644 --- a/includes/content/JsonContentHandler.php +++ b/includes/content/JsonContentHandler.php @@ -30,13 +30,18 @@ class JsonContentHandler extends CodeContentHandler { public function __construct( $modelId = CONTENT_MODEL_JSON ) { - parent::__construct( $modelId, array( CONTENT_FORMAT_JSON ) ); + parent::__construct( $modelId, [ CONTENT_FORMAT_JSON ] ); } /** * @return string */ protected function getContentClass() { - return 'JsonContent'; + return JsonContent::class; + } + + public function makeEmptyContent() { + $class = $this->getContentClass(); + return new $class( '{}' ); } }