getData(); } /** * Constructs an FallbackContent instance wrapping the given data. * * @since 1.21 * * @param string $blob serialized content in an unknown format * @param string|null $format ignored * * @return Content The FallbackContent object wrapping $data */ public function unserializeContent( $blob, $format = null ) { return new FallbackContent( $blob, $this->getModelID() ); } /** * Creates an empty FallbackContent object. * * @since 1.21 * * @return Content A new FallbackContent object with empty text. */ public function makeEmptyContent() { return $this->unserializeContent( '' ); } /** * @return false */ public function supportsDirectEditing() { return false; } /** * Fills the ParserOutput with an error message. * @since 1.38 * @param Content $content * @param ContentParseParams $cpoParams * @param ParserOutput &$output The output object to fill (reference). * */ protected function fillParserOutput( Content $content, ContentParseParams $cpoParams, ParserOutput &$output ) { '@phan-var FallbackContent $content'; $msg = wfMessage( 'unsupported-content-model', [ $content->getModel() ] ); $html = Html::rawElement( 'div', [ 'class' => 'error' ], $msg->inContentLanguage()->parse() ); $output->setRawText( $html ); } /** * @param IContextSource $context * * @return SlotDiffRenderer */ protected function getSlotDiffRendererInternal( IContextSource $context ) { return new UnsupportedSlotDiffRenderer( $context ); } } /** @deprecated class alias since 1.43 */ class_alias( FallbackContentHandler::class, 'FallbackContentHandler' );