350 public function convert( $toModel, $lossy =
'' );
361class_alias( Content::class,
'Content' );
Content objects represent page content, e.g.
getRedirectTarget()
Get the redirect destination or null if this content doesn't represent a redirect.
serialize( $format=null)
Serialize this Content object.
addSectionHeader( $header)
Create a derived WikitextContent with a prepended section heading, or return $this.
getWikitextForTransclusion()
isEmpty()
Whether this Content object is considered empty.
getDefaultFormat()
Get the default serialization format.
equals(?Content $that=null)
Whether this Content object is conceptually equivalent to another one.
matchMagicWord(MagicWord $word)
Returns true if this Content object matches the given magic word.
isCountable( $hasLinks=null)
Whether this content may count towards a "real" wiki page.
copy()
Create a copy of this Content object.
getSupportedFormats()
Get the list of supported serialization formats.
convert( $toModel, $lossy='')
Converts this content object into another content object with the given content model,...
isValid()
Whether the content is valid.
updateRedirect(Title $target)
Create a derived Content with a replaced redirect destination.
getContentHandler()
Convenience method that returns the ContentHandler singleton for handling the content model that this...
getTextForSummary( $maxLength=250)
Get a textual representation of the content, suitable for use in edit summaries and log messages.
getSize()
Get the content's nominal size in "bogo-bytes".
isRedirect()
Whether this Content represents a redirect.
isSupportedFormat( $format)
Whether a given format is a supported serialization format for this Content.
getModel()
Get the content model ID.
getSection( $sectionId)
Create a derived Content for the portion of text in the specified section.
replaceSection( $sectionId, Content $with, $sectionTitle='')
Create a derived Content with the specified section added or replaced.
getNativeData()
Get native representation of the data.