MediaWiki REL1_35
|
Wrapper allowing us to handle a system message as a Content object. More...
Public Member Functions | |
__construct ( $msg, $params=null) | |
copy () | |
getHtml () | |
Fully parse the text from wikitext to HTML. | |
getMessage () | |
Returns the message object, with any parameters already substituted. | |
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) | |
Public Member Functions inherited from AbstractContent | |
__construct ( $modelId=null) | |
Stable to call. | |
addSectionHeader ( $header) | |
Stable to override. | |
convert ( $toModel, $lossy='') | |
This base implementation calls the hook ConvertContent to enable custom conversions. | |
equals (Content $that=null) | |
Decides whether two Content objects are equal. | |
getContentHandler () | |
getDefaultFormat () | |
getDeletionUpdates (WikiPage $page, ParserOutput $parserOutput=null) | |
Stable to override. | |
getModel () | |
getRedirectChain () | |
getRedirectTarget () | |
Subclasses that implement redirects should override this. | |
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 data store. | |
getSection ( $sectionId) | |
Stable to override. | |
getSupportedFormats () | |
getUltimateRedirectTarget () | |
isEmpty () | |
Stable to override. | |
isRedirect () | |
isSupportedFormat ( $format) | |
isValid () | |
Subclasses may override this to implement (light weight) validation. | |
matchMagicWord (MagicWord $word) | |
This default implementation always returns false. | |
preloadTransform (Title $title, ParserOptions $popts, $params=[]) | |
Stable to override. | |
prepareSave (WikiPage $page, $flags, $parentRevId, User $user) | |
Stable to override. | |
preSaveTransform (Title $title, User $user, ParserOptions $popts) | |
Stable to override. | |
replaceSection ( $sectionId, Content $with, $sectionTitle='') | |
Stable to override. | |
serialize ( $format=null) | |
Stable to override. | |
updateRedirect (Title $target) | |
This default implementation always returns $this. | |
Protected Attributes | |
Message | $mMessage |
Protected Attributes inherited from AbstractContent | |
string | $model_id |
Name of the content model this Content object represents. | |
Additional Inherited Members | |
Protected Member Functions inherited from AbstractContent | |
checkFormat ( $format) | |
checkModelID ( $modelId) | |
equalsInternal (Content $that) | |
Checks whether $that is logically equal to this Content object. | |
fillParserOutput (Title $title, $revId, ParserOptions $options, $generateHtml, ParserOutput &$output) | |
Fills the provided ParserOutput with information derived from the content. | |
getContentHandlerFactory () | |
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.
MessageContent::__construct | ( | $msg, | |
$params = null |
|||
) |
Message | string | $msg | A Message object, or a message key. |
string[] | null | $params | An optional array of message parameters. |
Definition at line 47 of file MessageContent.php.
References CONTENT_MODEL_WIKITEXT, and wfMessage().
MessageContent::copy | ( | ) |
Implements Content.
Definition at line 146 of file MessageContent.php.
MessageContent::getHtml | ( | ) |
Fully parse the text from wikitext to HTML.
Definition at line 67 of file MessageContent.php.
Referenced by getParserOutput().
MessageContent::getMessage | ( | ) |
Returns the message object, with any parameters already substituted.
Definition at line 98 of file MessageContent.php.
References $mMessage.
Referenced by getNativeData().
MessageContent::getNativeData | ( | ) |
Returns the message object, with any parameters already substituted.
Implements Content.
Definition at line 87 of file MessageContent.php.
References getMessage().
MessageContent::getParserOutput | ( | Title | $title, |
$revId = null , |
|||
ParserOptions | $options = null , |
||
$generateHtml = true |
|||
) |
Title | $title | Unused. |
int | null | $revId | Unused. |
ParserOptions | null | $options | Unused. |
bool | $generateHtml | Whether to generate HTML (default: true). |
Reimplemented from AbstractContent.
Definition at line 173 of file MessageContent.php.
References getHtml().
MessageContent::getSize | ( | ) |
Implements Content.
Definition at line 137 of file MessageContent.php.
MessageContent::getTextForSearchIndex | ( | ) |
Implements Content.
Definition at line 108 of file MessageContent.php.
MessageContent::getTextForSummary | ( | $maxlength = 250 | ) |
int | $maxlength | Maximum length of the summary text, defaults to 250. |
Implements Content.
Definition at line 128 of file MessageContent.php.
MessageContent::getWikitext | ( | ) |
Returns the message text.
{{-transformation is done.
Definition at line 76 of file MessageContent.php.
Referenced by getWikitextForTransclusion().
MessageContent::getWikitextForTransclusion | ( | ) |
Implements Content.
Definition at line 117 of file MessageContent.php.
References getWikitext().
MessageContent::isCountable | ( | $hasLinks = null | ) |
bool | null | $hasLinks |
Implements Content.
Definition at line 159 of file MessageContent.php.
|
protected |
Definition at line 41 of file MessageContent.php.
Referenced by getMessage().