MediaWiki REL1_34
TimelessVariablesModule.php
Go to the documentation of this file.
1<?php
13 $vars = parent::getLessVars( $context );
14 $config = $this->getConfig();
15
16 // Backdrop image
17 $backdrop = $config->get( 'TimelessBackdropImage' );
18
19 if ( $backdrop === 'cat.svg' ) {
20 // expand default
21 $backdrop = 'images/cat.svg';
22 }
23
24 $vars = array_merge(
25 $vars,
26 [
27 'backdrop-image' => "url($backdrop)",
28 // 'logo-image' => ''
29 // 'wordmark-image' => ''
30 // +width cutoffs ...
31 ]
32 );
33
34 return $vars;
35 }
36
44 $summary = parent::getDefinitionSummary( $context );
45 $summary[] = [
46 'TimelessBackdropImage' => $this->getConfig()->get( 'TimelessBackdropImage' )
47 ];
48 return $summary;
49 }
50}
Context object that contains information about the state of a specific ResourceLoader web request.
Module for skin stylesheets.
ResourceLoader module to set some LESS variables for the skin.
getLessVars(ResourceLoaderContext $context)
Add our LESS variables.
getDefinitionSummary(ResourceLoaderContext $context)
Register the config var with the caching stuff so it properly updates the cache.
get( $name)
Get a configuration variable such as "Sitename" or "UploadMaintenance.".
$context
Definition load.php:45