|
MediaWiki master
|
Factory class to create Skin objects. More...
Public Member Functions | |
| __construct (ObjectFactory $objectFactory, array $skipSkins) | |
| getAllowedSkins () | |
| Get the list of user-selectable skins. | |
| getInstalledSkins () | |
| Get the list of installed skins. | |
| getSkinOptions (string $name) | |
| Return options provided for a given skin name. | |
| makeSkin ( $name) | |
| Create a given Skin using the registered callback for $name. | |
| register ( $name, $displayName, $spec, ?bool $skippable=null) | |
| Register a new skin. | |
| MediaWiki\Skin\SkinFactory::__construct | ( | ObjectFactory | $objectFactory, |
| array | $skipSkins ) |
| ObjectFactory | $objectFactory | |
| string[] | $skipSkins |
Definition at line 56 of file SkinFactory.php.
| MediaWiki\Skin\SkinFactory::getAllowedSkins | ( | ) |
Get the list of user-selectable skins.
Useful for Special:Preferences and other places where you only want to show skins users can select from preferences page, thus excluding those as configured by $wgSkipSkins.
Definition at line 134 of file SkinFactory.php.
References MediaWiki\Skin\SkinFactory\getInstalledSkins().
| MediaWiki\Skin\SkinFactory::getInstalledSkins | ( | ) |
Get the list of installed skins.
Returns an associative array of skin name => human readable name
Definition at line 152 of file SkinFactory.php.
Referenced by MediaWiki\Skin\SkinFactory\getAllowedSkins().
| MediaWiki\Skin\SkinFactory::getSkinOptions | ( | string | $name | ) |
Return options provided for a given skin name.
For documentation about keys you can expect to exist, and their default values, refer to the Skin constructor.
| string | $name | Name of the skin you want options from |
Definition at line 166 of file SkinFactory.php.
| MediaWiki\Skin\SkinFactory::makeSkin | ( | $name | ) |
Create a given Skin using the registered callback for $name.
| string | $name | Name of the skin you want |
| SkinException | If a factory function isn't registered for $name |
Definition at line 110 of file SkinFactory.php.
| MediaWiki\Skin\SkinFactory::register | ( | $name, | |
| $displayName, | |||
| $spec, | |||
| ?bool | $skippable = null ) |
Register a new skin.
This will replace any previously registered skin by the same name.
| string | $name | Internal skin name. See also Skin::__construct. |
| string | $displayName | For backwards-compatibility with old skin loading system. This is the text used as skin's human-readable name when the 'skinname-<skin>' message is not available. |
| array | callable | $spec | ObjectFactory spec to construct a Skin object, or callback that takes a skin name and returns a Skin object. See Skin::__construct for the constructor arguments. |
| true | null | $skippable | Whether the skin is skippable and should be hidden from user preferences. By default, this is determined based by $wgSkipSkins. |
Definition at line 76 of file SkinFactory.php.