31 if ( !isset( $this->definition[
'icons'] ) || !$this->definition[
'icons'] ) {
32 throw new InvalidArgumentException(
"Parameter 'icons' must be given." );
37 $this->definition[
'themeImages'] =
'icons';
41 return $this->definition[
'icons'];
48 if ( !isset( $data[$theme] ) ) {
51 foreach ( self::$knownImagesModules as $module ) {
52 if ( substr( $module, 0, 5 ) ===
'icons' ) {
55 $data[$theme] = array_replace_recursive( $data[$theme], $moreData );
65 foreach ( array_keys(
$definition[
'images'] ) as $iconName ) {
66 if ( !in_array( $iconName, $iconsNames ) ) {
getThemeImagesPath( $theme, $module)
string $localBasePath
Local base path, see __construct()
Allows loading arbitrary sets of OOUI icons.
static extractLocalBasePath( $options, $localBasePath=null)
Extract a local base path from module definition information.
__construct( $options=[], $localBasePath=null)
Constructs a new module from an options array.
loadOOUIDefinition( $theme, $unused)
Load the module definition from the JSON file(s) for the given theme and module.
Loads the module definition from JSON files in the format that OOUI uses, converting it to the format...
readJSONFile( $dataPath)
Read JSON from a file, and transform all paths in it to be relative to the module's base path.