mediawiki-skins-Vector/includes/SkinVector22.php
jdlrobson 99cf6eb5be Restore gadget support to new internal skins
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
2022-01-07 00:18:17 +00:00

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',
];
}
}