diff options
author | Brian Evans <grknight@gentoo.org> | 2022-09-27 18:53:03 -0400 |
---|---|---|
committer | Brian Evans <grknight@gentoo.org> | 2022-09-27 19:02:02 -0400 |
commit | 5ca8d30155e11d97b20f79acec40632c2e06fcd5 (patch) | |
tree | 7531fb116791f8328c0bb0cabe42265ca67e6df9 /MLEB/Translate/src/MessageBundleTranslation/MessageBundleContentHandler.php | |
parent | Merge branch 'master' into wikitest (diff) | |
download | extensions-1.35.2.tar.gz extensions-1.35.2.tar.bz2 extensions-1.35.2.zip |
Update MLEB to 2021.12v1.35.2
This is the final version for MW 1.35
Signed-off-by: Brian Evans <grknight@gentoo.org>
Diffstat (limited to 'MLEB/Translate/src/MessageBundleTranslation/MessageBundleContentHandler.php')
-rw-r--r-- | MLEB/Translate/src/MessageBundleTranslation/MessageBundleContentHandler.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/MLEB/Translate/src/MessageBundleTranslation/MessageBundleContentHandler.php b/MLEB/Translate/src/MessageBundleTranslation/MessageBundleContentHandler.php new file mode 100644 index 00000000..166e15ec --- /dev/null +++ b/MLEB/Translate/src/MessageBundleTranslation/MessageBundleContentHandler.php @@ -0,0 +1,27 @@ +<?php +declare( strict_types = 1 ); + +namespace MediaWiki\Extension\Translate\MessageBundleTranslation; + +use TextContentHandler; +use const CONTENT_FORMAT_JSON; + +/** + * @author Niklas Laxström + * @license GPL-2.0-or-later + * @since 2021.05 + */ +class MessageBundleContentHandler extends TextContentHandler { + public function __construct( $modelId = MessageBundleContent::CONTENT_MODEL_ID ) { + parent::__construct( $modelId, [ CONTENT_FORMAT_JSON ] ); + } + + protected function getContentClass() { + return MessageBundleContent::class; + } + + public function makeEmptyContent() { + $class = $this->getContentClass(); + return new $class( '{}' ); + } +} |