MediaWiki REL1_33
CiteCSSFileModule.php
Go to the documentation of this file.
1<?php
2
10
11 public function __construct(
12 $options = [],
13 $localBasePath = null,
14 $remoteBasePath = null
15 ) {
16 global $wgContLang;
17
18 parent::__construct( $options, $localBasePath, $remoteBasePath );
19
20 // Get the content language code, and all the fallbacks. The first that
21 // has a ext.cite.style.<lang code>.css file present will be used.
22 $langCodes = array_merge( [ $wgContLang->getCode() ],
23 $wgContLang->getFallbackLanguages() );
24 foreach ( $langCodes as $lang ) {
25 $langStyleFile = 'ext.cite.style.' . $lang . '.css';
26 $localPath = $this->getLocalPath( $langStyleFile );
27 if ( file_exists( $localPath ) ) {
28 $this->styles[] = $langStyleFile;
29 break;
30 }
31 }
32 }
33
34}
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
$wgContLang
Definition Setup.php:790
ResourceLoaderFileModule for adding the content language Cite CSS.
__construct( $options=[], $localBasePath=null, $remoteBasePath=null)
Constructs a new module from an options array.
ResourceLoader module based on local JavaScript/CSS files.
string $localBasePath
Local base path, see __construct()
string $remoteBasePath
Remote base path, see __construct()
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped & $options
Definition hooks.txt:1999
if(!isset( $args[0])) $lang