|
ILIAS
release_8 Revision v8.24
|
This class is responsible for all file system related actions related actions of a skin such as copying files and folders, generating a new skin, deleting a skin etc. More...
Collaboration diagram for ilSkinStyleContainer:Public Member Functions | |
| __construct (ilLanguage $lng, ilSkin $skin, ilSystemStyleMessageStack $message_stack, ilSystemStyleConfig $system_styles_conf=null, ilFileSystemHelper $file_system=null) | |
| create (ilSystemStyleMessageStack $message_stack) | |
| Creates a new skin. More... | |
| updateSkin (ilSkin $old_skin=null) | |
| Updates the skin. More... | |
| updateStyle (string $style_id, ilSkinStyle $old_style) | |
| Updates one single style. More... | |
| createMainLessFile (ilSkinStyle $style) | |
| Creates the main less file. More... | |
| copyVariablesFromDefault (ilSkinStyle $style) | |
| Copies (resets) the variables file from delos. More... | |
| resetImages (ilSkinStyle $style) | |
| Copies (resets) the images from delos. More... | |
| copyCSSFromDefault (ilSkinStyle $style) | |
| Copies (resets) the images from delos. More... | |
| delete () | |
| Deletes the container of a skin completely. More... | |
| deleteStyle (ilSkinStyle $style) | |
| Deletes a style completely. More... | |
| export () | |
| Exports the complete skin to an zip file. More... | |
| createTempZip () | |
| Creates a temp zip file. More... | |
| compileLess (string $style_id) | |
| getSkin () | |
| setSkin (ilSkin $skin) | |
| getSkinDirectory () | |
| getCSSFilePath (string $style_id) | |
| getLessFilePath (string $style_id) | |
| getLessVariablesFilePath (string $style_id) | |
| getLessVariablesName (string $style_id) | |
| getImagesSkinPath (string $style_id) | |
| getMessageStack () | |
| setMessageStack (ilSystemStyleMessageStack $message_stack) | |
| addStyle (ilSkinStyle $style) | |
| getSystemStylesConf () | |
| setSystemStylesConf (ilSystemStyleConfig $system_styles_conf) | |
Protected Member Functions | |
| resourcesStyleReferences (string $resource) | |
| Checks if a given resource (folder) is still referenced by a style of the containers skin. More... | |
| createLessStructure (ilSkinStyle $style) | |
| Creates the less/css structure of a style. More... | |
| getLessMainFileDefautContent (ilSkinStyle $style) | |
| Returns the main less default content if a new style is created. More... | |
| changeVariablesImport (string $main_path, string $old_style_import, string $new_style_import) | |
| writeSkinToXML () | |
Protected Attributes | |
| ilLanguage | $lng |
| ilSkin | $skin |
| Data-scope for the skin this container capsules. More... | |
| ilSystemStyleMessageStack | $message_stack |
| Used to stack messages to be displayed to the user (mostly reports for failed actions) More... | |
| ilSystemStyleConfig | $system_styles_conf |
| Used to wire this component up with the correct pathes into the customizing directory. More... | |
| ilFileSystemHelper | $file_system |
This class is responsible for all file system related actions related actions of a skin such as copying files and folders, generating a new skin, deleting a skin etc.
It contains exactly one skin containing several styles. Use this class to parse a skin from xml.
Definition at line 26 of file class.ilSkinStyleContainer.php.
| ilSkinStyleContainer::__construct | ( | ilLanguage | $lng, |
| ilSkin | $skin, | ||
| ilSystemStyleMessageStack | $message_stack, | ||
| ilSystemStyleConfig | $system_styles_conf = null, |
||
| ilFileSystemHelper | $file_system = null |
||
| ) |
Definition at line 47 of file class.ilSkinStyleContainer.php.
References $file_system, $lng, $skin, $system_styles_conf, ILIAS\Repository\lng(), setMessageStack(), and setSystemStylesConf().
Here is the call graph for this function:| ilSkinStyleContainer::addStyle | ( | ilSkinStyle | $style | ) |
Definition at line 487 of file class.ilSkinStyleContainer.php.
References ilSkinStyle\getId().
Referenced by ilSkinStyleContainerTest\testAddStyle().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 400 of file class.ilSkinStyleContainer.php.
Referenced by updateStyle().
Here is the caller graph for this function:| ilSkinStyleContainer::compileLess | ( | string | $style_id | ) |
| ilSystemStyleException |
Definition at line 417 of file class.ilSkinStyleContainer.php.
References ilSystemStyleException\LESS_COMPILE_FAILED, and ilSystemStyleException\LESSC_NOT_INSTALLED.
Referenced by createLessStructure(), and updateStyle().
Here is the caller graph for this function:| ilSkinStyleContainer::copyCSSFromDefault | ( | ilSkinStyle | $style | ) |
Copies (resets) the images from delos.
Definition at line 296 of file class.ilSkinStyleContainer.php.
References getCSSFilePath(), ilSkinStyle\getId(), and getSystemStylesConf().
Referenced by createLessStructure().
Here is the call graph for this function:
Here is the caller graph for this function:| ilSkinStyleContainer::copyVariablesFromDefault | ( | ilSkinStyle | $style | ) |
Copies (resets) the variables file from delos.
Definition at line 273 of file class.ilSkinStyleContainer.php.
References ilSkinStyle\getId(), getLessVariablesFilePath(), and getSystemStylesConf().
Referenced by createLessStructure(), and updateStyle().
Here is the call graph for this function:
Here is the caller graph for this function:| ilSkinStyleContainer::create | ( | ilSystemStyleMessageStack | $message_stack | ) |
Creates a new skin.
This includes the generation of the XML and the corresponding folders of all contained styles.
| ilSystemStyleException |
Definition at line 75 of file class.ilSkinStyleContainer.php.
References Vendor\Package\$e, $message_stack, ilSystemStyleMessageStack\addMessage(), createLessStructure(), getImagesSkinPath(), getSkin(), getSkinDirectory(), getSystemStylesConf(), ILIAS\Repository\lng(), ilSystemStyleException\SKIN_ALREADY_EXISTS, ilSystemStyleMessage\TYPE_ERROR, and writeSkinToXML().
Referenced by ilSkinStyleContainerTest\testCreateDelete().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Creates the less/css structure of a style.
| ilSystemStyleException |
Definition at line 247 of file class.ilSkinStyleContainer.php.
References compileLess(), copyCSSFromDefault(), copyVariablesFromDefault(), createMainLessFile(), and ilSkinStyle\getId().
Referenced by create().
Here is the call graph for this function:
Here is the caller graph for this function:| ilSkinStyleContainer::createMainLessFile | ( | ilSkinStyle | $style | ) |
Creates the main less file.
Definition at line 258 of file class.ilSkinStyleContainer.php.
References $path, ilSkinStyle\getId(), getLessFilePath(), getLessMainFileDefautContent(), getMessageStack(), ILIAS\Repository\lng(), and ilSystemStyleMessage\TYPE_SUCCESS.
Referenced by createLessStructure(), and updateStyle().
Here is the call graph for this function:
Here is the caller graph for this function:| ilSkinStyleContainer::createTempZip | ( | ) |
Creates a temp zip file.
Definition at line 393 of file class.ilSkinStyleContainer.php.
References getSkin(), getSkinDirectory(), and ilFileUtils\zip().
Referenced by export(), and ilSkinFactoryTest\testImportSkin().
Here is the call graph for this function:
Here is the caller graph for this function:| ilSkinStyleContainer::delete | ( | ) |
Deletes the container of a skin completely.
Definition at line 316 of file class.ilSkinStyleContainer.php.
References getMessageStack(), ILIAS\Repository\lng(), and ilSystemStyleMessage\TYPE_SUCCESS.
Referenced by ilSkinStyleContainerTest\testCreateDelete(), and ilSkinStyleContainerTest\testDeleteSkin().
Here is the call graph for this function:
Here is the caller graph for this function:| ilSkinStyleContainer::deleteStyle | ( | ilSkinStyle | $style | ) |
Deletes a style completely.
Definition at line 330 of file class.ilSkinStyleContainer.php.
References ilSystemStyleSettings\deleteSubStyleCategoryAssignments(), getCSSFilePath(), ilSkinStyle\getFontDirectory(), ILIAS\Survey\Mode\getId(), ilSkinStyle\getId(), ilSkinStyle\getImageDirectory(), getLessFilePath(), getLessVariablesFilePath(), getMessageStack(), ilSkinStyle\getName(), getSkin(), getSkinDirectory(), ilSkinStyle\getSoundDirectory(), ilSkinStyle\getSubstyleOf(), ilSkinStyle\isSubstyle(), ILIAS\Repository\lng(), resourcesStyleReferences(), ilSystemStyleMessage\TYPE_SUCCESS, and writeSkinToXML().
Referenced by ilSkinStyleContainerTest\testDeleteStyle().
Here is the call graph for this function:
Here is the caller graph for this function:| ilSkinStyleContainer::export | ( | ) |
Exports the complete skin to an zip file.
Definition at line 380 of file class.ilSkinStyleContainer.php.
References createTempZip(), ilFileDelivery\deliverFileAttached(), ILIAS\Survey\Mode\getId(), and getSkin().
Here is the call graph for this function:| ilSkinStyleContainer::getCSSFilePath | ( | string | $style_id | ) |
Definition at line 452 of file class.ilSkinStyleContainer.php.
Referenced by copyCSSFromDefault(), deleteStyle(), and updateStyle().
Here is the caller graph for this function:| ilSkinStyleContainer::getImagesSkinPath | ( | string | $style_id | ) |
Definition at line 472 of file class.ilSkinStyleContainer.php.
Referenced by create(), resetImages(), and updateStyle().
Here is the caller graph for this function:| ilSkinStyleContainer::getLessFilePath | ( | string | $style_id | ) |
Definition at line 457 of file class.ilSkinStyleContainer.php.
Referenced by createMainLessFile(), deleteStyle(), and updateStyle().
Here is the caller graph for this function:
|
protected |
Returns the main less default content if a new style is created.
Definition at line 304 of file class.ilSkinStyleContainer.php.
References ilSkinStyle\getId(), getLessVariablesName(), and getSystemStylesConf().
Referenced by createMainLessFile().
Here is the call graph for this function:
Here is the caller graph for this function:| ilSkinStyleContainer::getLessVariablesFilePath | ( | string | $style_id | ) |
Definition at line 462 of file class.ilSkinStyleContainer.php.
Referenced by copyVariablesFromDefault(), and deleteStyle().
Here is the caller graph for this function:| ilSkinStyleContainer::getLessVariablesName | ( | string | $style_id | ) |
Definition at line 467 of file class.ilSkinStyleContainer.php.
Referenced by getLessMainFileDefautContent().
Here is the caller graph for this function:| ilSkinStyleContainer::getMessageStack | ( | ) |
Definition at line 477 of file class.ilSkinStyleContainer.php.
Referenced by createMainLessFile(), delete(), deleteStyle(), and updateStyle().
Here is the caller graph for this function:| ilSkinStyleContainer::getSkin | ( | ) |
Definition at line 437 of file class.ilSkinStyleContainer.php.
Referenced by create(), createTempZip(), deleteStyle(), export(), resourcesStyleReferences(), ilSkinFactoryTest\testCopySkin(), ilSkinFactoryTest\testCopySkinWithInjectedName(), ilSkinStyleContainerTest\testCreateDelete(), ilSkinStyleContainerTest\testDeleteSkin(), ilSkinFactoryTest\testImportSkin(), ilSkinFactoryTest\testSkinStyleContainerFromId(), ilSkinStyleContainerTest\testUpdateSkinWithChangedID(), ilSkinStyleContainerTest\testUpdateStyle(), updateSkin(), and updateStyle().
Here is the caller graph for this function:| ilSkinStyleContainer::getSkinDirectory | ( | ) |
Definition at line 447 of file class.ilSkinStyleContainer.php.
Referenced by create(), createTempZip(), deleteStyle(), resetImages(), updateSkin(), and updateStyle().
Here is the caller graph for this function:| ilSkinStyleContainer::getSystemStylesConf | ( | ) |
Definition at line 499 of file class.ilSkinStyleContainer.php.
Referenced by copyCSSFromDefault(), copyVariablesFromDefault(), create(), getLessMainFileDefautContent(), resetImages(), updateSkin(), and updateStyle().
Here is the caller graph for this function:| ilSkinStyleContainer::resetImages | ( | ilSkinStyle | $style | ) |
Copies (resets) the images from delos.
Definition at line 284 of file class.ilSkinStyleContainer.php.
References ilSkinStyle\getId(), ilSkinStyle\getImageDirectory(), getImagesSkinPath(), getSkinDirectory(), and getSystemStylesConf().
Here is the call graph for this function:
|
protected |
Checks if a given resource (folder) is still referenced by a style of the containers skin.
Definition at line 232 of file class.ilSkinStyleContainer.php.
References getSkin().
Referenced by deleteStyle(), and updateStyle().
Here is the call graph for this function:
Here is the caller graph for this function:| ilSkinStyleContainer::setMessageStack | ( | ilSystemStyleMessageStack | $message_stack | ) |
Definition at line 482 of file class.ilSkinStyleContainer.php.
Referenced by __construct().
Here is the caller graph for this function:| ilSkinStyleContainer::setSkin | ( | ilSkin | $skin | ) |
Definition at line 442 of file class.ilSkinStyleContainer.php.
| ilSkinStyleContainer::setSystemStylesConf | ( | ilSystemStyleConfig | $system_styles_conf | ) |
Definition at line 504 of file class.ilSkinStyleContainer.php.
Referenced by __construct().
Here is the caller graph for this function:| ilSkinStyleContainer::updateSkin | ( | ilSkin | $old_skin = null | ) |
Updates the skin.
Style are not updated, use updateStyle for that.
| ilSystemStyleException |
Definition at line 112 of file class.ilSkinStyleContainer.php.
References getSkin(), getSkinDirectory(), getSystemStylesConf(), and writeSkinToXML().
Referenced by ilSkinStyleContainerTest\testUpdateSkinNoIdChange(), and ilSkinStyleContainerTest\testUpdateSkinWithChangedID().
Here is the call graph for this function:
Here is the caller graph for this function:| ilSkinStyleContainer::updateStyle | ( | string | $style_id, |
| ilSkinStyle | $old_style | ||
| ) |
Updates one single style.
Definition at line 132 of file class.ilSkinStyleContainer.php.
References Vendor\Package\$e, changeVariablesImport(), compileLess(), copyVariablesFromDefault(), createMainLessFile(), ilSkinStyle\getCssFile(), getCSSFilePath(), ilSkinStyle\getFontDirectory(), ilSkinStyle\getImageDirectory(), getImagesSkinPath(), getLessFilePath(), getMessageStack(), getSkin(), getSkinDirectory(), ilSkinStyle\getSoundDirectory(), getSystemStylesConf(), resourcesStyleReferences(), ilSystemStyleMessage\TYPE_ERROR, and writeSkinToXML().
Referenced by ilSkinStyleContainerTest\testUpdateStyle().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 494 of file class.ilSkinStyleContainer.php.
Referenced by create(), deleteStyle(), updateSkin(), and updateStyle().
Here is the caller graph for this function:
|
protected |
Definition at line 45 of file class.ilSkinStyleContainer.php.
Referenced by __construct().
|
protected |
Definition at line 28 of file class.ilSkinStyleContainer.php.
Referenced by __construct().
|
protected |
Used to stack messages to be displayed to the user (mostly reports for failed actions)
Definition at line 38 of file class.ilSkinStyleContainer.php.
Referenced by create().
|
protected |
Data-scope for the skin this container capsules.
Definition at line 33 of file class.ilSkinStyleContainer.php.
Referenced by __construct().
|
protected |
Used to wire this component up with the correct pathes into the customizing directory.
Definition at line 43 of file class.ilSkinStyleContainer.php.
Referenced by __construct().