5 class CssContent
extends TextContent
{
6 public function __construct( $text ) {
7 parent
::__construct( $text, CONTENT_MODEL_CSS
);
11 * Returns a Content object with pre-save transformations applied using
12 * Parser::preSaveTransform().
16 * @param $popts ParserOptions
19 public function preSaveTransform( Title
$title, User
$user, ParserOptions
$popts ) {
21 // @todo: make pre-save transformation optional for script pages
23 $text = $this->getNativeData();
24 $pst = $wgParser->preSaveTransform( $text, $title, $user, $popts );
26 return new CssContent( $pst );
30 protected function getHtml( ) {
32 $html .= "<pre class=\"mw-code mw-css\" dir=\"ltr\">\n";
33 $html .= $this->getHighlightHtml( );
34 $html .= "\n</pre>\n";