mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-28 09:30:17 +00:00
99cf6eb5be
For vector-2022 skin: * MediaWiki:Vector.css and MediaWiki:Vector.js are added via the existing ResourceLoader hook. * User:<name>/vector.js and User:<name>/vector.css are added via new VectorResourceLoader modules Bug: T297758 Change-Id: I37e9a9d353695502213c7a651530995252d9505f
57 lines
1 KiB
PHP
57 lines
1 KiB
PHP
<?php
|
|
/**
|
|
* @ingroup Skins
|
|
* @package Vector
|
|
* @internal
|
|
*/
|
|
class SkinVector22 extends SkinVector {
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
public function __construct( $options = [] ) {
|
|
$options += [
|
|
'template' => self::getTemplateOption(),
|
|
'scripts' => self::getScriptsOption(),
|
|
'styles' => self::getStylesOption(),
|
|
];
|
|
parent::__construct( $options );
|
|
}
|
|
|
|
/**
|
|
* Temporary static function while we deprecate SkinVector class.
|
|
*
|
|
* @return string
|
|
*/
|
|
public static function getTemplateOption() {
|
|
return 'skin';
|
|
}
|
|
|
|
/**
|
|
* Temporary static function while we deprecate SkinVector class.
|
|
*
|
|
* @return array
|
|
*/
|
|
public static function getScriptsOption() {
|
|
return [
|
|
'skins.vector.user',
|
|
'skins.vector.js',
|
|
'skins.vector.es6',
|
|
];
|
|
}
|
|
|
|
/**
|
|
* Temporary static function while we deprecate SkinVector class.
|
|
*
|
|
* @return array
|
|
*/
|
|
public static function getStylesOption() {
|
|
return [
|
|
'mediawiki.ui.button',
|
|
'skins.vector.styles',
|
|
'skins.vector.user.styles',
|
|
'skins.vector.icons',
|
|
'mediawiki.ui.icon',
|
|
];
|
|
}
|
|
}
|