ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
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 | getCurrentSkin () |
get the current skin More... | |
static | getAllTemplates () |
static | skinExists ($skin_id, ilSystemStyleConfig $system_style_config=null) |
Check whether a skin exists. More... | |
static | getCurrentStyle () |
get the current style or sub style More... | |
static | getAllSkinStyles () |
Get all skins/styles as array (convenient for tables) Attention: tempalte_name/template_id in this array is only used for legacy reasons an might be removed in future. More... | |
static | setCurrentSkin ($a_skin) |
static | styleExists ($style_id) |
static | styleExistsForSkinId ($skin_id, $style_id) |
static | styleExistsForCurrentSkin ($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 |
ilSystemStyleException |
Definition at line 84 of file class.ilStyleDefinition.php.
References $system_style_config, getSystemStylesConf(), setSkin(), and setSystemStylesConf().
|
static |
Get all skins/styles as array (convenient for tables) Attention: tempalte_name/template_id in this array is only used for legacy reasons an might be removed in future.
ilSystemStyleException |
Definition at line 348 of file class.ilStyleDefinition.php.
References $DIC, $skin, $skins, $style, and ilObjUser\_getNumberOfUsersForStyle().
Referenced by ilSystemStyleOverviewGUI\addSubStyleForms(), ilSystemStyleOverviewGUI\checkStyleSettings(), ilSystemStyleOverviewGUI\cloneSystemStyleForm(), ilSystemStyleOverviewGUI\edit(), ilSystemStylesTableGUI\getStyles(), and ilSystemStyleOverviewGUI\saveStyleSettings().
|
static |
ilSystemStyleException |
Definition at line 245 of file class.ilStyleDefinition.php.
|
staticprotected |
Definition at line 491 of file class.ilStyleDefinition.php.
|
static |
get the current skin
use always this function instead of getting the account's skin the current skin may be changed on the fly by setCurrentSkin()
Definition at line 111 of file class.ilStyleDefinition.php.
References $DIC, and ilUtil\sendFailure().
Referenced by ilUtil\getImagePath(), ilUtil\getJSLocation(), ilUtil\getNewContentStyleSheetLocation(), ilUtil\getStyleSheetLocation(), ilTestPDFGenerator\getTemplatePath(), and ilTemplate\getTemplatePath().
|
static |
get the current style or sub style
use always this function instead of getting the account's style the current style may be changed on the fly by setCurrentStyle()
ilSystemStyleException |
Definition at line 283 of file class.ilStyleDefinition.php.
References $_GET, $DIC, $i, $path, $system_style_config, $target_arr, ilSystemStyleSettings\getSystemStyleCategoryAssignments(), and ilUtil\sendFailure().
Referenced by ilUtil\getImagePath(), ilUtil\getNewContentStyleSheetLocation(), ilUtil\getStyleSheetLocation(), and ilTemplate\getTemplatePath().
ilStyleDefinition::getImageDirectory | ( | $style_id | ) |
$style_id |
ilSystemStyleException |
Definition at line 179 of file class.ilStyleDefinition.php.
References getSkin(), getStyle(), ilSystemStyleException\NO_STYLE_ID, and ilSystemStyleException\NOT_EXISTING_STYLE.
ilStyleDefinition::getSkin | ( | ) |
Definition at line 475 of file class.ilStyleDefinition.php.
References $skin.
Referenced by getImageDirectory(), getSoundDirectory(), getStyle(), getStyleName(), getStyles(), and getTemplateName().
|
static |
ilSystemStyleException |
Definition at line 459 of file class.ilStyleDefinition.php.
Referenced by ilUtil\getStyleSheetLocation().
ilStyleDefinition::getSoundDirectory | ( | $style_id | ) |
$style_id |
ilSystemStyleException |
Definition at line 195 of file class.ilStyleDefinition.php.
References $skin, $skins, $system_style_config, and getSkin().
ilStyleDefinition::getStyle | ( | $a_id | ) |
$a_id |
ilSystemStyleException |
Definition at line 159 of file class.ilStyleDefinition.php.
References getSkin().
Referenced by getImageDirectory().
ilStyleDefinition::getStyleName | ( | $a_id | ) |
$a_id |
ilSystemStyleException |
Definition at line 169 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 507 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 499 of file class.ilStyleDefinition.php.
References $cached_all_styles_information.
|
static |
$a_skin |
ilSystemStyleException |
Definition at line 393 of file class.ilStyleDefinition.php.
References $DIC.
|
static |
$a_style |
Definition at line 450 of file class.ilStyleDefinition.php.
ilStyleDefinition::setSkin | ( | $skin | ) |
ilSkinXML | $skin |
Definition at line 483 of file class.ilStyleDefinition.php.
References $skin.
Referenced by __construct().
|
static |
ilSkinXML[] | $skins |
Definition at line 467 of file class.ilStyleDefinition.php.
References $skins.
ilStyleDefinition::setSystemStylesConf | ( | $system_style_config | ) |
$system_style_config |
Definition at line 515 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 256 of file class.ilStyleDefinition.php.
References $system_style_config.
Referenced by ilSystemStyleSkinContainer\copy(), ilSystemStyleSettings\getCurrentDefaultSkin(), ilSystemStyleSkinContainer\import(), ilObjUser\read(), and ilSystemStyleOverviewGUI\saveNewSystemStyle().
|
static |
$style_id |
ilSystemStyleException |
Definition at line 411 of file class.ilStyleDefinition.php.
References $skin.
Referenced by ilSystemStylesTableGUI\getStyles(), and ilSystemStyleOverviewGUI\moveUserStyles().
|
static |
$style_id |
Definition at line 440 of file class.ilStyleDefinition.php.
References $DIC.
|
static |
$skin_id | |
$style_id |
ilSystemStyleException |
Definition at line 427 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 getAllSkinStyles(), getSkin(), getSoundDirectory(), setSkin(), styleExists(), and styleExistsForSkinId().
|
static |
Definition at line 55 of file class.ilStyleDefinition.php.
Referenced by getAllSkinStyles(), getSoundDirectory(), and setSkins().
|
protected |
Definition at line 76 of file class.ilStyleDefinition.php.
Referenced by __construct(), getCurrentStyle(), getSoundDirectory(), getSystemStylesConf(), setSystemStylesConf(), and skinExists().