|
MediaWiki
master
|
Content for JavaScript pages. More...


Public Member Functions | |
| __construct ($text, $modelId=CONTENT_MODEL_JAVASCRIPT) | |
| getRedirectTarget () | |
| preSaveTransform (Title $title, User $user, ParserOptions $popts) | |
| Returns a Content object with pre-save transformations applied using Parser::preSaveTransform(). More... | |
| updateRedirect (Title $target) | |
| If this page is a redirect, return the content if it should redirect to $target instead. More... | |
Public Member Functions inherited from TextContent | |
| __construct ($text, $model_id=CONTENT_MODEL_TEXT) | |
| convert ($toModel, $lossy= '') | |
| This implementation provides lossless conversion between content models based on TextContent. More... | |
| copy () | |
| diff (Content $that, Language $lang=null) | |
| Diff this content object with another content object. More... | |
| getNativeData () | |
| Returns the text represented by this Content object, as a string. More... | |
| getSize () | |
| Returns the text's size in bytes. More... | |
| getTextForSearchIndex () | |
| Returns the text represented by this Content object, as a string. More... | |
| getTextForSummary ($maxlength=250) | |
| Returns a textual representation of the content suitable for use in edit summaries and log messages. More... | |
| getWikitextForTransclusion () | |
| Returns attempts to convert this content object to wikitext, and then returns the text string. More... | |
| isCountable ($hasLinks=null) | |
| Returns true if this content is not a redirect, and $wgArticleCountMethod is "any". More... | |
| preSaveTransform (Title $title, User $user, ParserOptions $popts) | |
| Returns a Content object with pre-save transformations applied. More... | |
Public Member Functions inherited from AbstractContent | |
| __construct ($modelId=null) | |
| addSectionHeader ($header) | |
| convert ($toModel, $lossy= '') | |
| This base implementation calls the hook ConvertContent to enable custom conversions. More... | |
| equals (Content $that=null) | |
| getContentHandler () | |
| getDefaultFormat () | |
| getDeletionUpdates (WikiPage $page, ParserOutput $parserOutput=null) | |
| getModel () | |
| getParserOutput (Title $title, $revId=null, ParserOptions $options=null, $generateHtml=true) | |
| Returns a ParserOutput object containing information derived from this content. More... | |
| getRedirectChain () | |
| getRedirectTarget () | |
| Subclasses that implement redirects should override this. More... | |
| 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. More... | |
| getSection ($sectionId) | |
| getSupportedFormats () | |
| getUltimateRedirectTarget () | |
| isEmpty () | |
| isRedirect () | |
| isSupportedFormat ($format) | |
| isValid () | |
| Subclasses may override this to implement (light weight) validation. More... | |
| matchMagicWord (MagicWord $word) | |
| This default implementation always returns false. More... | |
| preloadTransform (Title $title, ParserOptions $popts, $params=[]) | |
| prepareSave (WikiPage $page, $flags, $parentRevId, User $user) | |
| preSaveTransform (Title $title, User $user, ParserOptions $popts) | |
| replaceSection ($sectionId, Content $with, $sectionTitle= '') | |
| serialize ($format=null) | |
| updateRedirect (Title $target) | |
| This default implementation always returns $this. More... | |
Protected Member Functions | |
| getHtml () | |
Protected Member Functions inherited from TextContent | |
| fillParserOutput (Title $title, $revId, ParserOptions $options, $generateHtml, ParserOutput &$output) | |
| Fills the provided ParserOutput object with information derived from the content. More... | |
| getHighlightHtml () | |
| Generates an HTML version of the content, for display. More... | |
| getHtml () | |
| Generates an HTML version of the content, for display. More... | |
Protected Member Functions inherited from AbstractContent | |
| checkFormat ($format) | |
| checkModelID ($modelId) | |
| fillParserOutput (Title $title, $revId, ParserOptions $options, $generateHtml, ParserOutput &$output) | |
| Fills the provided ParserOutput with information derived from the content. More... | |
Private Attributes | |
| bool Title null | $redirectTarget = false |
Additional Inherited Members | |
Protected Attributes inherited from AbstractContent | |
| $model_id | |
| Name of the content model this Content object represents. More... | |
Content for JavaScript pages.
Definition at line 33 of file JavaScriptContent.php.
| JavaScriptContent::__construct | ( | $text, | |
$modelId = CONTENT_MODEL_JAVASCRIPT |
|||
| ) |
| string | $text | JavaScript code. |
| string | $modelId | the content model name |
Definition at line 44 of file JavaScriptContent.php.
|
protected |
tag.
Definition at line 72 of file JavaScriptContent.php.
References $html, and TextContent\getNativeData().
| JavaScriptContent::getRedirectTarget | ( | ) |
Implements Content.
Definition at line 99 of file JavaScriptContent.php.
References $matches, $redirectTarget, $title, AbstractContent\equals(), AbstractContent\getContentHandler(), TextContent\getNativeData(), and Title\newFromText().
| JavaScriptContent::preSaveTransform | ( | Title | $title, |
| User | $user, | ||
| ParserOptions | $popts | ||
| ) |
Returns a Content object with pre-save transformations applied using Parser::preSaveTransform().
| Title | $title | |
| User | $user | |
| ParserOptions | $popts |
Implements Content.
Definition at line 58 of file JavaScriptContent.php.
References $wgParser, TextContent\getNativeData(), and global.
| JavaScriptContent::updateRedirect | ( | Title | $target | ) |
If this page is a redirect, return the content if it should redirect to $target instead.
| Title | $target |
Implements Content.
Definition at line 88 of file JavaScriptContent.php.
References AbstractContent\getContentHandler(), and AbstractContent\isRedirect().
Definition at line 38 of file JavaScriptContent.php.
Referenced by getRedirectTarget().