MediaWiki  REL1_24
MessageContent Class Reference

Wrapper allowing us to handle a system message as a Content object. More...

Inheritance diagram for MessageContent:
Collaboration diagram for MessageContent:

List of all members.

Public Member Functions

 __construct ($msg, $params=null)
 copy ()
 getHtml ()
 Fully parse the text from wikitext to HTML.
 getNativeData ()
 Returns the message object, with any parameters already substituted.
 getParserOutput (Title $title, $revId=null, ParserOptions $options=null, $generateHtml=true)
 getSize ()
 getTextForSearchIndex ()
 getTextForSummary ($maxlength=250)
 getWikitext ()
 Returns the message text.
 getWikitextForTransclusion ()
 isCountable ($hasLinks=null)

Protected Attributes

Message $mMessage

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.

Definition at line 36 of file MessageContent.php.


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.

Definition at line 46 of file MessageContent.php.


Member Function Documentation

Returns:
Content A copy of this object
See also:
Content::copy

Implements Content.

Definition at line 132 of file MessageContent.php.

Fully parse the text from wikitext to HTML.

Returns:
string Parsed HTML.

Definition at line 66 of file MessageContent.php.

Returns the message object, with any parameters already substituted.

Returns:
Message The message object.

Implements Content.

Definition at line 84 of file MessageContent.php.

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

Reimplemented from AbstractContent.

Definition at line 158 of file MessageContent.php.

Returns:
int
See also:
Content::getSize

Implements Content.

Definition at line 123 of file MessageContent.php.

Returns:
string
See also:
Content::getTextForSearchIndex

Implements Content.

Definition at line 94 of file MessageContent.php.

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.

Definition at line 114 of file MessageContent.php.

Returns the message text.

{{-transformation is done.

Returns:
string Unescaped message text.

Definition at line 75 of file MessageContent.php.

Returns:
string
See also:
Content::getWikitextForTransclusion

Implements Content.

Definition at line 103 of file MessageContent.php.

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

Implements Content.

Definition at line 144 of file MessageContent.php.


Member Data Documentation

Message MessageContent::$mMessage [protected]

Definition at line 40 of file MessageContent.php.


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