MediaWiki
REL1_23
|
00001 <?php 00033 class CssContent extends TextContent { 00034 00038 public function __construct( $text ) { 00039 parent::__construct( $text, CONTENT_MODEL_CSS ); 00040 } 00041 00054 public function preSaveTransform( Title $title, User $user, ParserOptions $popts ) { 00055 global $wgParser; 00056 // @todo Make pre-save transformation optional for script pages 00057 00058 $text = $this->getNativeData(); 00059 $pst = $wgParser->preSaveTransform( $text, $title, $user, $popts ); 00060 00061 return new CssContent( $pst ); 00062 } 00063 00067 protected function getHtml() { 00068 $html = ""; 00069 $html .= "<pre class=\"mw-code mw-css\" dir=\"ltr\">\n"; 00070 $html .= $this->getHighlightHtml(); 00071 $html .= "\n</pre>\n"; 00072 00073 return $html; 00074 } 00075 00076 }