|
ILIAS
release_9 Revision v9.13-25-g2c18ec4c24f
|
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... | |
| createMainScssFile (ilSkinStyle $style) | |
| Creates the main Scss file. More... | |
| copySettingsFromDefault (ilSkinStyle $style) | |
| Copies (resets) the settings files 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... | |
| compileScss (string $style_id) | |
| getSkin () | |
| setSkin (ilSkin $skin) | |
| getSkinDirectory () | |
| getCSSFilePath (string $style_id) | |
| getScssFilePath (string $style_id) | |
| getScssSettingsPath (string $style_id) | |
| getScssSettingsFolderName () | |
| getImagesStylePath (string $style_id) | |
| getSoundsStylePath (string $style_id) | |
| getFontsStylePath (string $style_id) | |
| getMessageStack () | |
| setMessageStack (ilSystemStyleMessageStack $message_stack) | |
| addStyle (ilSkinStyle $style) | |
| getSystemStylesConf () | |
| setSystemStylesConf (ilSystemStyleConfig $system_styles_conf) | |
Protected Member Functions | |
| createScssStructure (ilSkinStyle $style) | |
| Creates the Scss/css structure of a style. More... | |
| getNewMainScssFileContent (string $replacement_start, string $replacement_end) | |
| 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, ILIAS\Repository\lng(), setMessageStack(), and setSystemStylesConf().
Here is the call graph for this function:| ilSkinStyleContainer::addStyle | ( | ilSkinStyle | $style | ) |
Definition at line 492 of file class.ilSkinStyleContainer.php.
References ilSkinStyle\getId(), getSkin(), and updateStyle().
Referenced by ilSkinStyleContainerTest\testAddStyle(), and ilSkinStyleContainerTest\testAddSubstyle().
Here is the call graph for this function:
Here is the caller graph for this function:| ilSkinStyleContainer::compileScss | ( | string | $style_id | ) |
| ilSystemStyleException |
Definition at line 412 of file class.ilSkinStyleContainer.php.
References getCSSFilePath(), getScssFilePath(), ilSystemStyleException\SCSS_COMPILE_FAILED, and ilSystemStyleException\SCSS_NOT_INSTALLED.
Referenced by createScssStructure(), and updateStyle().
Here is the call graph for this function:
Here is the caller graph for this function:| ilSkinStyleContainer::copyCSSFromDefault | ( | ilSkinStyle | $style | ) |
Copies (resets) the images from delos.
Definition at line 317 of file class.ilSkinStyleContainer.php.
References getCSSFilePath(), ilSkinStyle\getId(), and getSystemStylesConf().
Referenced by createScssStructure().
Here is the call graph for this function:
Here is the caller graph for this function:| ilSkinStyleContainer::copySettingsFromDefault | ( | ilSkinStyle | $style | ) |
Copies (resets) the settings files from delos.
Definition at line 281 of file class.ilSkinStyleContainer.php.
References ILIAS\LTI\ToolProvider\$settings, ilSkinStyle\getId(), getScssSettingsFolderName(), getScssSettingsPath(), getSkinDirectory(), and getSystemStylesConf().
Referenced by createScssStructure(), 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 getSkin(), getSkinDirectory(), ilSystemStyleException\SKIN_ALREADY_EXISTS, updateStyle(), and writeSkinToXML().
Referenced by ilSkinStyleContainerTest\testCreateDelete().
Here is the call graph for this function:
Here is the caller graph for this function:| ilSkinStyleContainer::createMainScssFile | ( | ilSkinStyle | $style | ) |
Creates the main Scss file.
Definition at line 229 of file class.ilSkinStyleContainer.php.
References $path, ILIAS\LTI\ToolProvider\$settings, ilSkinStyle\getId(), getMessageStack(), getNewMainScssFileContent(), getScssFilePath(), getScssSettingsPath(), ILIAS\Repository\lng(), and ilSystemStyleMessage\TYPE_SUCCESS.
Referenced by createScssStructure(), and updateStyle().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Creates the Scss/css structure of a style.
| ilSystemStyleException |
Definition at line 218 of file class.ilSkinStyleContainer.php.
References compileScss(), copyCSSFromDefault(), copySettingsFromDefault(), createMainScssFile(), and ilSkinStyle\getId().
Here is the call graph for this function:| ilSkinStyleContainer::createTempZip | ( | ) |
Creates a temp zip file.
Definition at line 399 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 325 of file class.ilSkinStyleContainer.php.
References getMessageStack(), getSkinDirectory(), 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 339 of file class.ilSkinStyleContainer.php.
References ilSystemStyleSettings\deleteSubStyleCategoryAssignments(), getCSSFilePath(), ilSkinStyle\getFontDirectory(), ILIAS\Survey\Mode\getId(), ilSkinStyle\getId(), ilSkinStyle\getImageDirectory(), getMessageStack(), ilSkinStyle\getName(), getScssFilePath(), getSkin(), getSkinDirectory(), ilSkinStyle\getSoundDirectory(), ilSkinStyle\getSubstyleOf(), ilSkinStyle\isSubstyle(), ILIAS\Repository\lng(), 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 386 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 447 of file class.ilSkinStyleContainer.php.
References getSkinDirectory().
Referenced by compileScss(), copyCSSFromDefault(), deleteStyle(), and updateStyle().
Here is the call graph for this function:
Here is the caller graph for this function:| ilSkinStyleContainer::getFontsStylePath | ( | string | $style_id | ) |
Definition at line 477 of file class.ilSkinStyleContainer.php.
References getSkin(), and getSkinDirectory().
Referenced by updateStyle().
Here is the call graph for this function:
Here is the caller graph for this function:| ilSkinStyleContainer::getImagesStylePath | ( | string | $style_id | ) |
Definition at line 467 of file class.ilSkinStyleContainer.php.
References getSkin(), and getSkinDirectory().
Referenced by resetImages(), and updateStyle().
Here is the call graph for this function:
Here is the caller graph for this function:| ilSkinStyleContainer::getMessageStack | ( | ) |
Definition at line 482 of file class.ilSkinStyleContainer.php.
References $message_stack.
Referenced by createMainScssFile(), delete(), deleteStyle(), and updateStyle().
Here is the caller graph for this function:
|
protected |
Definition at line 264 of file class.ilSkinStyleContainer.php.
References getScssSettingsFolderName(), and getSystemStylesConf().
Referenced by createMainScssFile().
Here is the call graph for this function:
Here is the caller graph for this function:| ilSkinStyleContainer::getScssFilePath | ( | string | $style_id | ) |
Definition at line 452 of file class.ilSkinStyleContainer.php.
References getSkinDirectory().
Referenced by compileScss(), createMainScssFile(), deleteStyle(), and updateStyle().
Here is the call graph for this function:
Here is the caller graph for this function:| ilSkinStyleContainer::getScssSettingsFolderName | ( | ) |
Definition at line 462 of file class.ilSkinStyleContainer.php.
Referenced by copySettingsFromDefault(), getNewMainScssFileContent(), and updateStyle().
Here is the caller graph for this function:| ilSkinStyleContainer::getScssSettingsPath | ( | string | $style_id | ) |
Definition at line 457 of file class.ilSkinStyleContainer.php.
References getSkinDirectory().
Referenced by copySettingsFromDefault(), createMainScssFile(), and updateStyle().
Here is the call graph for this function:
Here is the caller graph for this function:| ilSkinStyleContainer::getSkin | ( | ) |
Definition at line 432 of file class.ilSkinStyleContainer.php.
References $skin.
Referenced by addStyle(), ilSkinFactory\copyFromSkinStyleContainer(), create(), createTempZip(), deleteStyle(), export(), getFontsStylePath(), getImagesStylePath(), getSkinDirectory(), getSoundsStylePath(), ilSkinStyleContainerTest\testAddSubstyle(), ilSkinFactoryTest\testCopySkin(), ilSkinFactoryTest\testCopySkinWithInjectedName(), ilSkinStyleContainerTest\testCreateDelete(), ilSkinStyleContainerTest\testDeleteSkin(), ilSkinFactoryTest\testImportSkin(), ilSkinFactoryTest\testSkinStyleContainerFromId(), ilSkinStyleContainerTest\testUpdateSkinWithChangedID(), ilSkinStyleContainerTest\testUpdateStyle(), updateSkin(), updateStyle(), and writeSkinToXML().
Here is the caller graph for this function:| ilSkinStyleContainer::getSkinDirectory | ( | ) |
Definition at line 442 of file class.ilSkinStyleContainer.php.
References getSkin(), and getSystemStylesConf().
Referenced by ilSkinFactory\copyFromSkinStyleContainer(), copySettingsFromDefault(), create(), createTempZip(), delete(), deleteStyle(), getCSSFilePath(), getFontsStylePath(), getImagesStylePath(), getScssFilePath(), getScssSettingsPath(), getSoundsStylePath(), updateSkin(), updateStyle(), and writeSkinToXML().
Here is the call graph for this function:
Here is the caller graph for this function:| ilSkinStyleContainer::getSoundsStylePath | ( | string | $style_id | ) |
Definition at line 472 of file class.ilSkinStyleContainer.php.
References getSkin(), and getSkinDirectory().
Referenced by updateStyle().
Here is the call graph for this function:
Here is the caller graph for this function:| ilSkinStyleContainer::getSystemStylesConf | ( | ) |
Definition at line 504 of file class.ilSkinStyleContainer.php.
References $system_styles_conf.
Referenced by copyCSSFromDefault(), ilSkinFactory\copyFromSkinStyleContainer(), copySettingsFromDefault(), getNewMainScssFileContent(), getSkinDirectory(), 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 305 of file class.ilSkinStyleContainer.php.
References ilSkinStyle\getId(), getImagesStylePath(), and getSystemStylesConf().
Here is the call graph for this function:| ilSkinStyleContainer::setMessageStack | ( | ilSystemStyleMessageStack | $message_stack | ) |
Definition at line 487 of file class.ilSkinStyleContainer.php.
References $message_stack.
Referenced by __construct().
Here is the caller graph for this function:| ilSkinStyleContainer::setSkin | ( | ilSkin | $skin | ) |
Definition at line 437 of file class.ilSkinStyleContainer.php.
References $skin.
| ilSkinStyleContainer::setSystemStylesConf | ( | ilSystemStyleConfig | $system_styles_conf | ) |
Definition at line 509 of file class.ilSkinStyleContainer.php.
References $system_styles_conf.
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 94 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 114 of file class.ilSkinStyleContainer.php.
References Vendor\Package\$e, compileScss(), copySettingsFromDefault(), createMainScssFile(), ilSkinStyle\getCssFile(), getCSSFilePath(), ilSkinStyle\getFontDirectory(), getFontsStylePath(), ilSkinStyle\getId(), ilSkinStyle\getImageDirectory(), getImagesStylePath(), getMessageStack(), getScssFilePath(), getScssSettingsFolderName(), getScssSettingsPath(), getSkin(), getSkinDirectory(), ilSkinStyle\getSoundDirectory(), getSoundsStylePath(), getSystemStylesConf(), ilSystemStyleMessage\TYPE_ERROR, and writeSkinToXML().
Referenced by addStyle(), create(), and ilSkinStyleContainerTest\testUpdateStyle().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 499 of file class.ilSkinStyleContainer.php.
References getSkin(), and getSkinDirectory().
Referenced by create(), deleteStyle(), updateSkin(), and updateStyle().
Here is the call graph for this function:
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 getMessageStack(), and setMessageStack().
|
protected |
Data-scope for the skin this container capsules.
Definition at line 33 of file class.ilSkinStyleContainer.php.
Referenced by __construct(), getSkin(), and setSkin().
|
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 getSystemStylesConf(), and setSystemStylesConf().