MediaWiki  master
CssContent Class Reference

Content object for CSS pages. More...

Inheritance diagram for CssContent:
Collaboration diagram for CssContent:

Public Member Functions

 __construct ( $text, $modelId=CONTENT_MODEL_CSS)
 Stable to call. More...
 
 getRedirectTarget ()
 
 preSaveTransform (Title $title, User $user, ParserOptions $popts)
 Returns a Content object with pre-save transformations applied using Parser::preSaveTransform(). More...
 
 updateRedirect (Title $target)
 
- Public Member Functions inherited from TextContent
 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...
 
 getText ()
 Returns the text represented by this Content object, as a string. More...
 
 getTextForSearchIndex ()
 Returns the text represented by this Content object, as a string. More...
 
 getTextForSummary ( $maxlength=250)
 Stable to override. 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...
 
- Public Member Functions inherited from AbstractContent
 __construct ( $modelId=null)
 Stable to call. More...
 
 addSectionHeader ( $header)
 Stable to override. More...
 
 equals (Content $that=null)
 Decides whether two Content objects are equal. More...
 
 getContentHandler ()
 
 getDefaultFormat ()
 
 getDeletionUpdates (WikiPage $page, ParserOutput $parserOutput=null)
 Stable to override. More...
 
 getModel ()
 
 getParserOutput (Title $title, $revId=null, ParserOptions $options=null, $generateHtml=true)
 Returns a ParserOutput object containing information derived from this content. More...
 
 getRedirectChain ()
 
 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)
 Stable to override. More...
 
 getSupportedFormats ()
 
 getUltimateRedirectTarget ()
 
 isEmpty ()
 Stable to override. More...
 
 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=[])
 Stable to override. More...
 
 prepareSave (WikiPage $page, $flags, $parentRevId, User $user)
 Stable to override. More...
 
 replaceSection ( $sectionId, Content $with, $sectionTitle='')
 Stable to override. More...
 
 serialize ( $format=null)
 Stable to override. 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...
 
- Protected Member Functions inherited from AbstractContent
 checkFormat ( $format)
 
 checkModelID ( $modelId)
 
 equalsInternal (Content $that)
 Checks whether $that is logically equal to this Content object. More...
 
 getContentHandlerFactory ()
 

Private Attributes

bool Title null $redirectTarget = false
 

Additional Inherited Members

- Static Public Member Functions inherited from TextContent
static normalizeLineEndings ( $text)
 Do a "\\r\\n" -> "\\n" and "\\r" -> "\\n" transformation as well as trim trailing whitespace. More...
 
- Protected Attributes inherited from TextContent
string $mText
 
- Protected Attributes inherited from AbstractContent
string $model_id
 Name of the content model this Content object represents. More...
 

Detailed Description

Content object for CSS pages.

@newable

Definition at line 36 of file CssContent.php.

Constructor & Destructor Documentation

◆ __construct()

CssContent::__construct (   $text,
  $modelId = CONTENT_MODEL_CSS 
)

Stable to call.

Parameters
string$textCSS code.
string$modelIdthe content content model

Reimplemented from TextContent.

Definition at line 48 of file CssContent.php.

Member Function Documentation

◆ getHtml()

CssContent::getHtml ( )
protected
Returns
string CSS wrapped in a
 tag.

Reimplemented from TextContent.

Definition at line 77 of file CssContent.php.

References Html\element(), and TextContent\getText().

◆ getRedirectTarget()

CssContent::getRedirectTarget ( )

◆ preSaveTransform()

CssContent::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
CssContent
See also
TextContent::preSaveTransform

Reimplemented from TextContent.

Definition at line 64 of file CssContent.php.

References $title, and TextContent\getText().

◆ updateRedirect()

CssContent::updateRedirect ( Title  $target)
Parameters
Title$target
Returns
CssContent

Reimplemented from AbstractContent.

Definition at line 88 of file CssContent.php.

References AbstractContent\getContentHandler(), and AbstractContent\isRedirect().

Member Data Documentation

◆ $redirectTarget

bool Title null CssContent::$redirectTarget = false
private

Definition at line 41 of file CssContent.php.

Referenced by getRedirectTarget().


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