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

Public Member Functions

 __construct ($text, $modelId=CONTENT_MODEL_JAVASCRIPT)
 
 preSaveTransform (Title $title, User $user, ParserOptions $popts)
 
 updateRedirect (Title $target)
 
 getRedirectTarget ()
 
- Public Member Functions inherited from TextContent
 __construct ($text, $model_id=CONTENT_MODEL_TEXT)
 
 copy ()
 
 getTextForSummary ($maxlength=250)
 
 getSize ()
 
 isCountable ($hasLinks=null)
 
 getNativeData ()
 
 getTextForSearchIndex ()
 
 getWikitextForTransclusion ()
 
 preSaveTransform (Title $title, User $user, ParserOptions $popts)
 
 diff (Content $that, Language $lang=null)
 
 convert ($toModel, $lossy= '')
 
- 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 Member Functions

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

Additional Inherited Members

- Static Public Member Functions inherited from TextContent
static normalizeLineEndings ($text)
 
- Protected Attributes inherited from TextContent
 $mText
 
- Protected Attributes inherited from AbstractContent
 $model_id
 

Detailed Description

Content for JavaScript pages.

Constructor & Destructor Documentation

JavaScriptContent::__construct (   $text,
  $modelId = CONTENT_MODEL_JAVASCRIPT 
)
Parameters
string$textJavaScript code.
string$modelIdthe content model name

Member Function Documentation

JavaScriptContent::getHtml ( )
protected
Returns
string JavaScript wrapped in a
 tag.
JavaScriptContent::getRedirectTarget ( )
Returns
Title|null

Implements Content.

JavaScriptContent::preSaveTransform ( Title  $title,
User  $user,
ParserOptions  $popts 
)

Returns a Content object with pre-save transformations applied using Parser::preSaveTransform().

Parameters
Title$title
User$user
ParserOptions$popts
Returns
JavaScriptContent

Implements Content.

JavaScriptContent::updateRedirect ( Title  $target)

If this page is a redirect, return the content if it should redirect to $target instead

Parameters
Title$target
Returns
JavaScriptContent

Implements Content.


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