32 if ( isset( $options[
'themeScripts'] ) ) {
34 if ( !isset( $options[
'skinScripts'] ) ) {
35 $options[
'skinScripts'] = [];
39 if ( isset( $options[
'themeStyles'] ) ) {
41 if ( !isset( $options[
'skinStyles'] ) ) {
42 $options[
'skinStyles'] = [];
47 parent::__construct( $options );
62 array_keys( $themes ),
63 array_map(
function ( $theme ) use ( $module, $which ) {
64 if ( $which ===
'scripts' ) {
69 }, array_values( $themes ) )
82 foreach ( $skinSpecific as $skin => $files ) {
83 if ( !is_array( $files ) ) {
86 if ( isset( $extraSkinSpecific[$skin] ) ) {
87 $skinSpecific[$skin] = array_merge( [ $extraSkinSpecific[$skin] ], $files );
88 } elseif ( isset( $extraSkinSpecific[
'default'] ) ) {
89 $skinSpecific[$skin] = array_merge( [ $extraSkinSpecific[
'default'] ], $files );
93 foreach ( $extraSkinSpecific as $skin =>
$file ) {
94 if ( !isset( $skinSpecific[$skin] ) ) {
95 $skinSpecific[$skin] =
$file;
static getSkinThemeMap()
Return a map of skin names (in lowercase) to OOUI theme names, defining which theme a given skin shou...
getThemeScriptsPath( $theme, $module)
getThemeStylesPath( $theme, $module)
Module based on local JavaScript/CSS files.
array $skinStyles
List of paths to CSS files to include when using specific skins.
array $skinScripts
List of JavaScript files to include when using a specific skin.
Module which magically loads the right skinScripts and skinStyles for every skin, using the specified...
getSkinSpecific( $module, $which)
Helper function to generate values for 'skinStyles' and 'skinScripts'.
extendSkinSpecific(array &$skinSpecific, array $extraSkinSpecific)
Prepend the $extraSkinSpecific assoc.
__construct(array $options=[])
trait ResourceLoaderOOUIModule
Convenience methods for dealing with OOUI themes and their relations to MW skins.
if(PHP_SAPI !='cli-server') if(!isset( $_SERVER['SCRIPT_FILENAME'])) $file
Item class for a filearchive table row.