BlueSpice MediaWiki master
 All Classes Namespaces Files Functions Variables Groups Pages
MessageContent Class Reference
Inheritance diagram for MessageContent:
Collaboration diagram for MessageContent:

Public Member Functions

 __construct ($msg, $params=null)
 
 getHtml ()
 
 getWikitext ()
 
 getNativeData ()
 
 getTextForSearchIndex ()
 
 getWikitextForTransclusion ()
 
 getTextForSummary ($maxlength=250)
 
 getSize ()
 
 copy ()
 
 isCountable ($hasLinks=null)
 
 getParserOutput (Title $title, $revId=null, ParserOptions $options=null, $generateHtml=true)
 
- Public Member Functions inherited from AbstractContent
 __construct ($modelId=null)
 
 getModel ()
 
 getContentHandler ()
 
 getDefaultFormat ()
 
 getSupportedFormats ()
 
 isSupportedFormat ($format)
 
 serialize ($format=null)
 
 isEmpty ()
 
 isValid ()
 
 equals (Content $that=null)
 
 getSecondaryDataUpdates (Title $title, Content $old=null, $recursive=true, ParserOutput $parserOutput=null)
 
 getRedirectChain ()
 
 getRedirectTarget ()
 
 getUltimateRedirectTarget ()
 
 isRedirect ()
 
 updateRedirect (Title $target)
 
 getSection ($sectionId)
 
 replaceSection ($sectionId, Content $with, $sectionTitle= '')
 
 preSaveTransform (Title $title, User $user, ParserOptions $popts)
 
 addSectionHeader ($header)
 
 preloadTransform (Title $title, ParserOptions $popts, $params=[])
 
 prepareSave (WikiPage $page, $flags, $parentRevId, User $user)
 
 getDeletionUpdates (WikiPage $page, ParserOutput $parserOutput=null)
 
 matchMagicWord (MagicWord $word)
 
 convert ($toModel, $lossy= '')
 
 getParserOutput (Title $title, $revId=null, ParserOptions $options=null, $generateHtml=true)
 

Protected Attributes

 $mMessage
 
- Protected Attributes inherited from AbstractContent
 $model_id
 

Additional Inherited Members

- Protected Member Functions inherited from AbstractContent
 checkModelID ($modelId)
 
 checkFormat ($format)
 
 fillParserOutput (Title $title, $revId, ParserOptions $options, $generateHtml, ParserOutput &$output)
 

Detailed Description

Wrapper allowing us to handle a system message as a Content object. Note that this is generally not used to represent content from the MediaWiki namespace, and that there is no MessageContentHandler. MessageContent is just intended as glue for wrapping a message programmatically.

Constructor & Destructor Documentation

MessageContent::__construct (   $msg,
  $params = null 
)
Parameters
Message | string$msgA Message object, or a message key.
string[]$params An optional array of message parameters.

Member Function Documentation

MessageContent::copy ( )
Returns
Content A copy of this object
See Also
Content::copy

Implements Content.

MessageContent::getHtml ( )

Fully parse the text from wikitext to HTML.

Returns
string Parsed HTML.
MessageContent::getNativeData ( )

Returns the message object, with any parameters already substituted.

Returns
Message The message object.

Implements Content.

MessageContent::getParserOutput ( Title  $title,
  $revId = null,
ParserOptions  $options = null,
  $generateHtml = true 
)
Parameters
Title$titleUnused.
int$revIdUnused.
ParserOptions$optionsUnused.
bool$generateHtmlWhether to generate HTML (default: true).
Returns
ParserOutput
See Also
Content::getParserOutput

Implements Content.

MessageContent::getSize ( )
Returns
int
See Also
Content::getSize

Implements Content.

MessageContent::getTextForSearchIndex ( )
Returns
string
See Also
Content::getTextForSearchIndex

Implements Content.

MessageContent::getTextForSummary (   $maxlength = 250)
Parameters
int$maxlengthMaximum length of the summary text, defaults to 250.
Returns
string The summary text.
See Also
Content::getTextForSummary

Implements Content.

MessageContent::getWikitext ( )

Returns the message text. {{-transformation is done.

Returns
string Unescaped message text.
MessageContent::getWikitextForTransclusion ( )
Returns
string
See Also
Content::getWikitextForTransclusion

Implements Content.

MessageContent::isCountable (   $hasLinks = null)
Parameters
bool | null$hasLinks
Returns
bool Always false.
See Also
Content::isCountable

Implements Content.


The documentation for this class was generated from the following file: