ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
ilStyleDefinition acts as a wrapper of style related actions. More...
Public Member Functions | |
__construct ($skin_id="", ilSystemStyleConfig $system_style_config=null) | |
ilStyleDefinition constructor. More... | |
getStyles () | |
getTemplateName () | |
getStyle ($a_id) | |
getStyleName ($a_id) | |
getImageDirectory ($style_id) | |
getSoundDirectory ($style_id) | |
getSkin () | |
setSkin ($skin) | |
getSystemStylesConf () | |
setSystemStylesConf ($system_style_config) | |
Static Public Member Functions | |
static | getAllTemplates () |
static | skinExists ($skin_id, ilSystemStyleConfig $system_style_config=null) |
Check whether a skin exists. More... | |
static | styleExists ($style_id) |
static | styleExistsForSkinId ($skin_id, $style_id) |
static | setCurrentStyle ($a_style) |
static | getSkins () |
static | setSkins ($skins) |
Static Public Attributes | |
static | $current_style = false |
static | $skins = [] |
Static Protected Member Functions | |
static | getCachedAllStylesInformation () |
static | setCachedAllStylesInformation ($cached_all_styles_information) |
Protected Attributes | |
$skin | |
$system_style_config | |
Static Protected Attributes | |
static | $cached_all_styles_information = null |
ilStyleDefinition acts as a wrapper of style related actions.
Use this class to get the systems current style. Currently some of the logic is not clearly separated from ilSystemStyleSettings. This is due to legacy reasons. In a future refactoring, this class might be completely merged with ilSystemStyleSettings.
The following terminology is used:
(system) style: A style that can be set as system style for the complete ILIAS installations. This includes, less css, fonts, icons and sounds as well as possible html tpl files to overide ILIAS templates. (stystem) sub style: A sub style can be assigned to exactly one system style to be displayed for a set of categories. skin: A skin can hold multiple style. A skin is defined by it's folder carrying the name of the skin and the template.xml in this exact folder, listing the skins styles and substyles. Mostly a skin caries exactly one style. Through the GUI in the administration it is not possible to define multiple style per skin. It is however possible to define multiple sub styles for one style stored in one skin. template: The template is the xml file of the skin storing the skin styles and sub styles information.
Skins, styles ans stub styles are always used globally (not client specific).
This class is currently also used as global $styleDefinition.
Definition at line 42 of file class.ilStyleDefinition.php.
ilStyleDefinition::__construct | ( | $skin_id = "" , |
|
ilSystemStyleConfig | $system_style_config = null |
||
) |
ilStyleDefinition constructor.
string | $skin_id | |
ilSystemStyleConfig | null | $system_style_config |
Definition at line 83 of file class.ilStyleDefinition.php.
References $DIC, $system_style_config, getSystemStylesConf(), ilUtil\sendFailure(), setSkin(), and setSystemStylesConf().
|
static |
Definition at line 240 of file class.ilStyleDefinition.php.
|
staticprotected |
Definition at line 497 of file class.ilStyleDefinition.php.
ilStyleDefinition::getImageDirectory | ( | $style_id | ) |
$style_id |
ilSystemStyleException |
Definition at line 177 of file class.ilStyleDefinition.php.
References getSkin(), getStyle(), ilSystemStyleException\NO_STYLE_ID, and ilSystemStyleException\NOT_EXISTING_STYLE.
ilStyleDefinition::getSkin | ( | ) |
Definition at line 481 of file class.ilStyleDefinition.php.
References $skin.
Referenced by getImageDirectory(), getSoundDirectory(), getStyle(), getStyleName(), getStyles(), and getTemplateName().
|
static |
Definition at line 465 of file class.ilStyleDefinition.php.
Referenced by ilUtil\getStyleSheetLocation().
ilStyleDefinition::getSoundDirectory | ( | $style_id | ) |
$style_id |
Definition at line 192 of file class.ilStyleDefinition.php.
References $skin, $skins, $system_style_config, and getSkin().
ilStyleDefinition::getStyle | ( | $a_id | ) |
$a_id |
Definition at line 158 of file class.ilStyleDefinition.php.
References getSkin().
Referenced by getImageDirectory().
ilStyleDefinition::getStyleName | ( | $a_id | ) |
$a_id |
Definition at line 167 of file class.ilStyleDefinition.php.
References getSkin().
ilStyleDefinition::getStyles | ( | ) |
Definition at line 139 of file class.ilStyleDefinition.php.
References getSkin().
ilStyleDefinition::getSystemStylesConf | ( | ) |
Definition at line 513 of file class.ilStyleDefinition.php.
References $system_style_config.
Referenced by __construct().
ilStyleDefinition::getTemplateName | ( | ) |
Definition at line 148 of file class.ilStyleDefinition.php.
References getSkin().
|
staticprotected |
array | null | $cached_all_styles_information |
Definition at line 505 of file class.ilStyleDefinition.php.
References $cached_all_styles_information.
|
static |
$a_style |
Definition at line 457 of file class.ilStyleDefinition.php.
ilStyleDefinition::setSkin | ( | $skin | ) |
ilSkinXML | $skin |
Definition at line 489 of file class.ilStyleDefinition.php.
References $skin.
Referenced by __construct().
|
static |
ilSkinXML[] | $skins |
Definition at line 473 of file class.ilStyleDefinition.php.
References $skins.
ilStyleDefinition::setSystemStylesConf | ( | $system_style_config | ) |
$system_style_config |
Definition at line 521 of file class.ilStyleDefinition.php.
References $system_style_config.
Referenced by __construct().
|
static |
Check whether a skin exists.
Not using array_key_exists($skin_id,self::getAllSkins()); for performance reasons
string | $skin_id | |
ilSystemStyleConfig | null | $system_style_config |
Definition at line 251 of file class.ilStyleDefinition.php.
References $_GET, $DIC, $i, $path, $skin, $skins, $style, $system_style_config, $target_arr, ilObjUser\_getNumberOfUsersForStyle(), ilSystemStyleSettings\getSystemStyleCategoryAssignments(), and ilUtil\sendFailure().
Referenced by ilSystemStyleSkinContainer\copy(), ilSystemStyleSettings\getCurrentDefaultSkin(), ilSystemStyleSkinContainer\import(), ilObjUser\read(), and ilSystemStyleOverviewGUI\saveNewSystemStyle().
|
static |
$style_id |
Definition at line 415 of file class.ilStyleDefinition.php.
References $skin.
Referenced by ilSystemStylesTableGUI\getStyles(), and ilSystemStyleOverviewGUI\moveUserStyles().
|
static |
$skin_id | |
$style_id |
ilSystemStyleException |
Definition at line 431 of file class.ilStyleDefinition.php.
References $skin, and ilSystemStyleSkinContainer\generateFromId().
Referenced by ilSystemStyleSettings\getCurrentDefaultStyle(), and ilObjUser\read().
|
staticprotected |
Definition at line 68 of file class.ilStyleDefinition.php.
Referenced by setCachedAllStylesInformation().
|
static |
Definition at line 49 of file class.ilStyleDefinition.php.
|
protected |
Definition at line 62 of file class.ilStyleDefinition.php.
Referenced by getSkin(), getSoundDirectory(), setSkin(), skinExists(), styleExists(), and styleExistsForSkinId().
|
static |
Definition at line 55 of file class.ilStyleDefinition.php.
Referenced by getSoundDirectory(), setSkins(), and skinExists().
|
protected |
Definition at line 76 of file class.ilStyleDefinition.php.
Referenced by __construct(), getSoundDirectory(), getSystemStylesConf(), setSystemStylesConf(), and skinExists().