ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
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 243 of file class.ilStyleDefinition.php.
|
staticprotected |
Definition at line 509 of file class.ilStyleDefinition.php.
ilStyleDefinition::getImageDirectory | ( | $style_id | ) |
$style_id |
ilSystemStyleException |
Definition at line 180 of file class.ilStyleDefinition.php.
References getSkin(), getStyle(), ilSystemStyleException\NO_STYLE_ID, and ilSystemStyleException\NOT_EXISTING_STYLE.
ilStyleDefinition::getSkin | ( | ) |
Definition at line 493 of file class.ilStyleDefinition.php.
References $skin.
Referenced by getImageDirectory(), getSoundDirectory(), getStyle(), getStyleName(), getStyles(), and getTemplateName().
|
static |
Definition at line 477 of file class.ilStyleDefinition.php.
Referenced by ilUtil\getStyleSheetLocation().
ilStyleDefinition::getSoundDirectory | ( | $style_id | ) |
$style_id |
Definition at line 195 of file class.ilStyleDefinition.php.
References $skin, $skins, $system_style_config, and getSkin().
ilStyleDefinition::getStyle | ( | $a_id | ) |
$a_id |
Definition at line 161 of file class.ilStyleDefinition.php.
References getSkin().
Referenced by getImageDirectory().
ilStyleDefinition::getStyleName | ( | $a_id | ) |
$a_id |
Definition at line 170 of file class.ilStyleDefinition.php.
References getSkin().
ilStyleDefinition::getStyles | ( | ) |
Definition at line 142 of file class.ilStyleDefinition.php.
References getSkin().
ilStyleDefinition::getSystemStylesConf | ( | ) |
Definition at line 525 of file class.ilStyleDefinition.php.
References $system_style_config.
Referenced by __construct().
ilStyleDefinition::getTemplateName | ( | ) |
Definition at line 151 of file class.ilStyleDefinition.php.
References getSkin().
|
staticprotected |
array | null | $cached_all_styles_information |
Definition at line 517 of file class.ilStyleDefinition.php.
References $cached_all_styles_information.
|
static |
$a_style |
Definition at line 469 of file class.ilStyleDefinition.php.
ilStyleDefinition::setSkin | ( | $skin | ) |
ilSkinXML | $skin |
Definition at line 501 of file class.ilStyleDefinition.php.
References $skin.
Referenced by __construct().
|
static |
ilSkinXML[] | $skins |
Definition at line 485 of file class.ilStyleDefinition.php.
References $skins.
ilStyleDefinition::setSystemStylesConf | ( | $system_style_config | ) |
$system_style_config |
Definition at line 533 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 253 of file class.ilStyleDefinition.php.
References $_GET, $DIC, $path, $ref_id, $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 429 of file class.ilStyleDefinition.php.
References $skin.
Referenced by ilSystemStylesTableGUI\getStyles(), and ilSystemStyleOverviewGUI\moveUserStyles().
|
static |
$skin_id | |
$style_id |
ilSystemStyleException |
Definition at line 445 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().