MediaWiki REL1_33
ResourceLoaderLessModule.php
Go to the documentation of this file.
1<?php
23namespace Vector;
24
25use CSSMin;
30
46 $lessVars = parent::getLessVars( $context );
47 try {
48 $config = MediaWikiServices::getInstance()->getConfigFactory()->makeConfig( 'vector' );
49 $printLogo = $config->get( 'VectorPrintLogo' );
50 } catch ( ConfigException $e ) {
51 // Config is not available when running in the context of the MediaWiki installer. (T183640)
52 $printLogo = false;
53 }
54 if ( $printLogo ) {
55 $lessVars[ 'printLogo' ] = true;
56 $lessVars[ 'printLogoUrl' ] = CSSMin::buildUrlValue( $printLogo['url'] );
57 $lessVars[ 'printLogoWidth' ] = intval( $printLogo['width'] );
58 $lessVars[ 'printLogoHeight' ] = intval( $printLogo['height'] );
59 } else {
60 $lessVars[ 'printLogo' ] = false;
61 }
62 return $lessVars;
63 }
64}
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
Transforms CSS data.
Definition CSSMin.php:30
Exceptions for config failures.
MediaWikiServices is the service locator for the application scope of MediaWiki.
Object passed around to modules which contains information about the state of a specific loader reque...
ResourceLoader module based on local JavaScript/CSS files.
ResourceLoader module for print styles.
getLessVars(ResourceLoaderContext $context)
Get language-specific LESS variables for this module.
do that in ParserLimitReportFormat instead use this to modify the parameters of the image all existing parser cache entries will be invalid To avoid you ll need to handle that somehow(e.g. with the RejectParserCacheValue hook) because MediaWiki won 't do it for you. & $defaults also a ContextSource after deleting those rows but within the same transaction you ll probably need to make sure the header is varied on and they can depend only on the ResourceLoaderContext $context
Definition hooks.txt:2848
returning false will NOT prevent logging $e
Definition hooks.txt:2175