getContentHandler()
Convenience method that returns the ContentHandler singleton for handling the content model that this...
Set options of the Parser.
getDefaultFormat()
Convenience method that returns the default serialization format for the content model that this Cont...
isRedirect()
Returns whether this Content represents a redirect.
serialize( $format=null)
Convenience method for serializing this Content object.
isValid()
Returns whether the content is valid.
convert( $toModel, $lossy='')
Converts this content object into another content object with the given content model,...
Class representing a MediaWiki article and history.
getDeletionUpdates(WikiPage $page, ParserOutput $parserOutput=null)
Returns a list of updates to perform when this content is deleted.
getSize()
Returns the content's nominal size in "bogo-bytes".
getWikitextForTransclusion()
getUltimateRedirectTarget()
Construct the redirect destination from this content and return the Title, or null if this content do...
getSection( $sectionId)
Returns the section with the given ID.
getSupportedFormats()
Convenience method that returns the list of serialization formats supported for the content model tha...
This class encapsulates "magic words" such as "#redirect", NOTOC, etc.
isEmpty()
Returns true if this Content object represents empty content.
replaceSection( $sectionId, Content $with, $sectionTitle='')
Replaces a section of the content and returns a Content object with the section replaced.
matchMagicWord(MagicWord $word)
Returns true if this Content object matches the given magic word.
prepareSave(WikiPage $page, $flags, $parentRevId, User $user)
Prepare Content for saving.
equals(Content $that=null)
Returns true if this Content objects is conceptually equivalent to the given Content object.
addSectionHeader( $header)
Returns a new WikitextContent object with the given section heading prepended, if supported.
getRedirectChain()
Construct the redirect destination from this content and return an array of Titles,...
updateRedirect(Title $target)
If this Content object is a redirect, this method updates the redirect target.
getSecondaryDataUpdates(Title $title, Content $old=null, $recursive=true, ParserOutput $parserOutput=null)
Returns a list of DataUpdate objects for recording information about this Content in some secondary d...
getNativeData()
Returns native representation of the data.
isSupportedFormat( $format)
Returns true if $format is a supported serialization format for this Content object,...
preSaveTransform(Title $title, User $user, ParserOptions $parserOptions)
Returns a Content object with pre-save transformations applied (or this object if no transformations ...
Base interface for content objects.
Represents a title within MediaWiki.
copy()
Return a copy of this Content object.
getTextForSummary( $maxLength=250)
Returns a textual representation of the content suitable for use in edit summaries and log messages.
preloadTransform(Title $title, ParserOptions $parserOptions, $params=[])
Returns a Content object with preload transformations applied (or this object if no transformations a...
getModel()
Returns the ID of the content model used by this Content object.
getParserOutput(Title $title, $revId=null, ParserOptions $options=null, $generateHtml=true)
Parse the Content object and generate a ParserOutput from the result.
getRedirectTarget()
Construct the redirect destination from this content and return a Title, or null if this content does...
isCountable( $hasLinks=null)
Returns true if this content is countable as a "real" wiki page, provided that it's also in a countab...
The User object encapsulates all of the user-specific settings (user_id, name, rights,...