32use Wikimedia\Minify\CSSMin;
53 return CssContent::class;
73 return new $class(
'/* #REDIRECT */@import ' . CSSMin::buildUrlValue(
$url ) .
';' );
80 '@phan-var CssContent $content';
84 if ( !$services->getUserOptionsLookup()->getBoolOption( $pstParams->
getUser(),
'pst-cssjs' ) ) {
87 $popts->setPreSaveTransform(
false );
90 $text = $content->getText();
91 $pst = $services->getParserFactory()->getInstance()->preSaveTransform(
99 return new $class( $pst );
112 '@phan-var CssContent $content';
113 if ( in_array( $content->
getModel(), $textModelsToParse ) ) {
119 WikiPage::makeParserOptionsFromTitleAndModel(
134 [
'class' => [
'mw-code',
'mw-css' ],
'dir' =>
'ltr' ],
135 "\n" . $content->getText() .
"\n"
149class_alias( CssContentHandler::class,
'CssContentHandler' );
const CONTENT_FORMAT_CSS
For CSS pages.
Content handler for pages with source code as content (e.g.
Content handler for CSS pages.
preSaveTransform(Content $content, PreSaveTransformParams $pstParams)
Returns a $content object with pre-save transformations applied (or the same object if no transformat...
supportsRedirects()
Returns true if this content model supports redirects.
__construct( $modelId=CONTENT_MODEL_CSS)
fillParserOutput(Content $content, ContentParseParams $cpoParams, ParserOutput &$output)
Fills the provided ParserOutput object with information derived from the content.Unless $generateHtml...
makeRedirectContent(Title $destination, $text='')
Create a redirect that is also valid CSS.
A class containing constants representing the names of configuration variables.
const TextModelsToParse
Name constant for the TextModelsToParse setting, for use with Config::get()
Base representation for an editable wiki page.
Content objects represent page content, e.g.
getModel()
Get the content model ID.