Go to the documentation of this file.
34 parent::__construct( $modelId, $formats );
78 $ok =
wfMerge( $old, $mine, $yours, $result );
90 return $mergedContent;
103 return TextContent::class;
120 return new $class( $text );
132 return new $class(
'' );
145 $fields = parent::getFieldsForSearchIndex( $engine );
146 $fields[
'language'] =
157 $fields = parent::getDataForSearchIndex( $page,
$output, $engine );
158 $fields[
'language'] =
const INDEX_TYPE_KEYWORD
KEYWORD fields are indexed without any processing, so are appropriate for e.g.
A content handler knows how do deal with a specific type of content on a wiki page.
__construct( $modelId=CONTENT_MODEL_TEXT, $formats=[CONTENT_FORMAT_TEXT])
Constructor, initializing the ContentHandler instance with its model ID and a list of supported forma...
unserializeContent( $text, $format=null)
Unserializes a Content object of the type supported by this ContentHandler.
wfMerge( $old, $mine, $yours, &$result, &$mergeAttemptResult=null)
wfMerge attempts to merge differences between three texts.
Class representing a MediaWiki article and history.
serializeContent(Content $content, $format=null)
Returns the content's text as-is.
getTitle()
Get the title object of the article.
const CONTENT_FORMAT_TEXT
merge3(Content $oldContent, Content $myContent, Content $yourContent)
Attempts to merge differences between three versions.
getFieldsForSearchIndex(SearchEngine $engine)
Get fields definition for search index.
getPageLanguage(Title $title, Content $content=null)
Get the language in which the content of the given page is written.
getDefaultFormat()
The format used for serialization/deserialization by default by this ContentHandler.
getDataForSearchIndex(WikiPage $page, ParserOutput $output, SearchEngine $engine)
Return fields to be indexed by search engine as representation of this document.
Base content handler implementation for flat text contents.
makeEmptyContent()
Creates an empty TextContent object.
Contain a class for special pages.
Base interface for content objects.
makeSearchFieldMapping( $name, $type)
Create a search field definition.
checkFormat( $format)
Convenient for checking whether a format provided as a parameter is actually supported.
getContentClass()
Returns the name of the associated Content class, to be used when creating new objects.
getModel()
Returns the ID of the content model used by this Content object.
getContent( $audience=RevisionRecord::FOR_PUBLIC, User $user=null)
Get the content of the current revision.