MediaWiki REL1_34
|
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. More...
Go to the source code of this file.
Functions | |
static | getSkinThemeMap () |
Return a map of skin names (in lowercase) to OOUI theme names, defining which theme a given skin should use. | |
getThemeImagesPath ( $theme, $module) | |
getThemePath ( $theme, $kind, $module) | |
Return a path to load given module of given theme from. | |
static | getThemePaths () |
Return a map of theme names to lists of paths from which a given theme should be loaded. | |
getThemeScriptsPath ( $theme, $module) | |
getThemeStylesPath ( $theme, $module) | |
Variables | |
static | $builtinSkinThemeMap |
static | $builtinThemePaths |
static | $knownImagesModules |
static | $knownStylesModules = [ 'core', 'widgets', 'toolbars', 'windows' ] |
trait | ResourceLoaderOOUIModule |
Convenience methods for dealing with OOUI themes and their relations to MW skins. | |
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. http://www.gnu.org/copyleft/gpl.html
Definition in file ResourceLoaderOOUIModule.php.
|
static |
Return a map of skin names (in lowercase) to OOUI theme names, defining which theme a given skin should use.
Definition at line 76 of file ResourceLoaderOOUIModule.php.
References $builtinSkinThemeMap.
Referenced by ResourceLoaderOOUIFileModule\getSkinSpecific(), and ResourceLoaderOOUIImageModule\loadFromDefinition().
|
protected |
string | $theme | See getThemePath() |
string | $module | See getThemePath() |
Definition at line 170 of file ResourceLoaderOOUIModule.php.
References getThemePath().
Referenced by ResourceLoaderOOUIImageModule\loadOOUIDefinition(), and ResourceLoaderOOUIIconPackModule\loadOOUIDefinition().
|
protected |
Return a path to load given module of given theme from.
The file at this path may not exist. This should be handled by the caller (throwing an error or falling back to default theme).
string | $theme | OOUI theme name, for example 'WikimediaUI' or 'Apex' |
string | $kind | Kind of the module: 'scripts', 'styles', or 'images' |
string | $module | Module name, for valid values see $knownScriptsModules, $knownStylesModules, $knownImagesModules |
Definition at line 126 of file ResourceLoaderOOUIModule.php.
References $path, and getThemePaths().
Referenced by getThemeImagesPath(), getThemeScriptsPath(), and getThemeStylesPath().
|
staticprotected |
Return a map of theme names to lists of paths from which a given theme should be loaded.
Keys are theme names, values are associative arrays. Keys of the inner array are 'scripts', 'styles', or 'images', and values are paths. Paths may be strings or ResourceLoaderFilePaths.
Additionally, the string '{module}' in paths represents the name of the module to load.
Definition at line 92 of file ResourceLoaderOOUIModule.php.
References $builtinThemePaths, $path, and ResourceLoaderFileModule\extractBasePaths().
Referenced by getThemePath().
|
protected |
string | $theme | See getThemePath() |
string | $module | See getThemePath() |
Definition at line 146 of file ResourceLoaderOOUIModule.php.
References getThemePath().
Referenced by ResourceLoaderOOUIFileModule\getSkinSpecific().
|
protected |
string | $theme | See getThemePath() |
string | $module | See getThemePath() |
Definition at line 158 of file ResourceLoaderOOUIModule.php.
References getThemePath().
Referenced by ResourceLoaderOOUIFileModule\getSkinSpecific().
|
staticprotected |
Definition at line 52 of file ResourceLoaderOOUIModule.php.
Referenced by getSkinThemeMap().
|
staticprotected |
Definition at line 57 of file ResourceLoaderOOUIModule.php.
Referenced by getThemePaths().
|
staticprotected |
Definition at line 30 of file ResourceLoaderOOUIModule.php.
|
staticprotected |
Definition at line 29 of file ResourceLoaderOOUIModule.php.