ILIAS
release_8 Revision v8.19-1-g4e8f2f9140c
|
ilSkin holds an manages the basic data of a skin as provide by the template of the skin. More...
Public Member Functions | |
__construct (string $id, string $name) | |
asXML () | |
Stores the skin and all it's styles as xml. More... | |
writeToXMLFile (string $path) | |
addStyle (ilSkinStyle $style) | |
removeStyle (string $id) | |
getStyle (string $id) | |
hasStyle (string $id) | |
getDefaultStyle () | |
valid () | |
key () | |
current () | |
next () | |
rewind () | |
count () | |
getId () | |
setId (string $id) | |
getName () | |
setName (string $name) | |
getStyles () | |
setStyles (array $styles) | |
getVersion () | |
setVersion (string $version) | |
getVersionStep (string $version) | |
isVersionChangeable () | |
updateParentStyleOfSubstyles (string $old_parent_style_id, string $new_parent_style_id) | |
getSubstylesOfStyle (string $style_id) | |
hasStyleSubstyles (string $style_id) | |
Returns wheter a given style has substyles. More... | |
hasStyles () | |
Protected Member Functions | |
addChildToXML (SimpleXMLElement $xml, ilSkinStyle $style) | |
Used to generate the xml for styles contained by the skin. More... | |
Protected Attributes | |
string | $id = '' |
ID of the skin, equals the name of the folder this skin is stored in. More... | |
string | $name = '' |
Name of the skin, as provided in the template. More... | |
array | $styles = [] |
string | $version = '0.1' |
Version of skin, as provided by the template. More... | |
ilSkin holds an manages the basic data of a skin as provide by the template of the skin.
This class is also responsible to read this data from the xml and, after manipulations transfer the data back to xml.
To read a skin from xml do not use this class, us ilSkinContainer instead.
Definition at line 27 of file class.ilSkin.php.
ilSkin::__construct | ( | string | $id, |
string | $name | ||
) |
Definition at line 52 of file class.ilSkin.php.
References setId(), and setName().
|
protected |
Used to generate the xml for styles contained by the skin.
Definition at line 87 of file class.ilSkin.php.
References ilSkinStyle\getCssFile(), ilSkinStyle\getFontDirectory(), ilSkinStyle\getId(), ilSkinStyle\getImageDirectory(), ilSkinStyle\getName(), ilSkinStyle\getSoundDirectory(), and ilSkinStyle\isSubstyle().
Referenced by asXML().
ilSkin::addStyle | ( | ilSkinStyle | $style | ) |
Definition at line 107 of file class.ilSkin.php.
ilSkin::asXML | ( | ) |
Stores the skin and all it's styles as xml.
Definition at line 61 of file class.ilSkin.php.
References $xml, addChildToXML(), getName(), getStyles(), getSubstylesOfStyle(), and getVersion().
Referenced by ilSkinFactoryTest\testSkinFromXML(), and writeToXMLFile().
ilSkin::count | ( | ) |
Definition at line 179 of file class.ilSkin.php.
Referenced by getVersionStep(), and hasStyles().
ilSkin::current | ( | ) |
Definition at line 164 of file class.ilSkin.php.
Referenced by valid().
ilSkin::getDefaultStyle | ( | ) |
Definition at line 149 of file class.ilSkin.php.
ilSkin::getId | ( | ) |
Definition at line 184 of file class.ilSkin.php.
References $id.
Referenced by ilSystemStyleDeleteGUI\addStyle(), ilSubStyleAssignmentGUI\assignStyle(), ilSubStyleAssignmentGUI\deleteAssignments(), ilStyleDefinition\getSoundDirectory(), ilSubStyleAssignmentGUI\saveAssignment(), ilSkinFactoryTest\testCopySkin(), ilSkinFactoryTest\testCopySkinWithInjectedName(), ilSkinStyleContainerTest\testDeleteSkin(), and ilSkinFactoryTest\testImportSkin().
ilSkin::getName | ( | ) |
Definition at line 200 of file class.ilSkin.php.
References $name.
Referenced by ilSystemStyleDeleteGUI\addStyle(), asXML(), ilSkinFactoryTest\testCopySkin(), and ilSkinFactoryTest\testCopySkinWithInjectedName().
ilSkin::getStyle | ( | string | $id | ) |
ilSystemStyleException |
Definition at line 129 of file class.ilSkin.php.
References $id, getStyles(), and ilSystemStyleException\INVALID_ID.
Referenced by ilSubStyleAssignmentGUI\assignStyle(), ilSubStyleAssignmentGUI\deleteAssignments(), ilSubStyleAssignmentGUI\saveAssignment(), and ilSkinStyleContainerTest\testUpdateStyle().
ilSkin::getStyles | ( | ) |
Definition at line 213 of file class.ilSkin.php.
References $styles.
Referenced by asXML(), getStyle(), getSubstylesOfStyle(), hasStyle(), hasStyles(), hasStyleSubstyles(), and removeStyle().
ilSkin::getSubstylesOfStyle | ( | string | $style_id | ) |
Definition at line 266 of file class.ilSkin.php.
References getStyles().
Referenced by asXML(), and updateParentStyleOfSubstyles().
ilSkin::getVersion | ( | ) |
Definition at line 226 of file class.ilSkin.php.
References $version.
Referenced by asXML().
ilSkin::getVersionStep | ( | string | $version | ) |
Definition at line 238 of file class.ilSkin.php.
References $version, count(), ILIAS\Repository\int(), and isVersionChangeable().
ilSkin::hasStyle | ( | string | $id | ) |
Definition at line 139 of file class.ilSkin.php.
References $id, and getStyles().
ilSkin::hasStyles | ( | ) |
Definition at line 296 of file class.ilSkin.php.
References count(), and getStyles().
ilSkin::hasStyleSubstyles | ( | string | $style_id | ) |
Returns wheter a given style has substyles.
Definition at line 284 of file class.ilSkin.php.
References getStyles().
Referenced by updateParentStyleOfSubstyles().
ilSkin::isVersionChangeable | ( | ) |
Definition at line 249 of file class.ilSkin.php.
Referenced by getVersionStep(), and setVersion().
ilSkin::key | ( | ) |
Definition at line 159 of file class.ilSkin.php.
ilSkin::next | ( | ) |
Definition at line 169 of file class.ilSkin.php.
ilSkin::removeStyle | ( | string | $id | ) |
ilSystemStyleException |
Definition at line 115 of file class.ilSkin.php.
References $id, $index, getStyles(), and ilSystemStyleException\INVALID_ID.
ilSkin::rewind | ( | ) |
Definition at line 174 of file class.ilSkin.php.
ilSkin::setId | ( | string | $id | ) |
ilSystemStyleException |
Definition at line 192 of file class.ilSkin.php.
References ilSystemStyleException\INVALID_CHARACTERS_IN_ID.
Referenced by __construct().
ilSkin::setName | ( | string | $name | ) |
Definition at line 205 of file class.ilSkin.php.
References $name.
Referenced by __construct().
ilSkin::setStyles | ( | array | $styles | ) |
ilSkinStyle[] | $styles |
Definition at line 221 of file class.ilSkin.php.
References $styles.
ilSkin::setVersion | ( | string | $version | ) |
Definition at line 231 of file class.ilSkin.php.
References $version, and isVersionChangeable().
Referenced by ilSkinFactory\__construct().
ilSkin::updateParentStyleOfSubstyles | ( | string | $old_parent_style_id, |
string | $new_parent_style_id | ||
) |
Definition at line 254 of file class.ilSkin.php.
References getSubstylesOfStyle(), and hasStyleSubstyles().
ilSkin::valid | ( | ) |
Definition at line 154 of file class.ilSkin.php.
References current().
ilSkin::writeToXMLFile | ( | string | $path | ) |
Definition at line 102 of file class.ilSkin.php.
References asXML().
|
protected |
ID of the skin, equals the name of the folder this skin is stored in.
Definition at line 32 of file class.ilSkin.php.
Referenced by getId(), getStyle(), hasStyle(), and removeStyle().
|
protected |
Name of the skin, as provided in the template.
Definition at line 38 of file class.ilSkin.php.
|
protected |
Definition at line 45 of file class.ilSkin.php.
Referenced by getStyles(), and setStyles().
|
protected |
Version of skin, as provided by the template.
Definition at line 50 of file class.ilSkin.php.
Referenced by getVersion(), getVersionStep(), and setVersion().