MediaWiki
REL1_22
|
00001 <?php 00033 class CssContent extends TextContent { 00034 public function __construct( $text ) { 00035 parent::__construct( $text, CONTENT_MODEL_CSS ); 00036 } 00037 00047 public function preSaveTransform( Title $title, User $user, ParserOptions $popts ) { 00048 global $wgParser; 00049 // @todo Make pre-save transformation optional for script pages 00050 00051 $text = $this->getNativeData(); 00052 $pst = $wgParser->preSaveTransform( $text, $title, $user, $popts ); 00053 00054 return new CssContent( $pst ); 00055 } 00056 00057 protected function getHtml() { 00058 $html = ""; 00059 $html .= "<pre class=\"mw-code mw-css\" dir=\"ltr\">\n"; 00060 $html .= $this->getHighlightHtml(); 00061 $html .= "\n</pre>\n"; 00062 00063 return $html; 00064 } 00065 }