19declare(strict_types=1);
45 public function skinFromXML(
string $path =
''):
ilSkin
47 if (strpos(
$path,
'../') === 0) {
48 $path = realpath(__DIR__ .
'/../../../../../../templates/' .
$path);
52 $xml =
new SimpleXMLElement(file_get_contents(
$path));
58 $skin =
new ilSkin(
$id, (
string) $xml->attributes()[
'name']);
59 $skin->setVersion((
string) $xml->attributes()[
'version']);
66 foreach ($xml->children() as $style_xml) {
72 if ($style_xml->getName() ==
'substyle') {
76 $style->setSubstyleOf($last_style->getId());
80 $skin->addStyle($style);
98 if ($skin_id !=
'default' && $skin_id !=
'other') {
101 $this->skinFromXML($this->config->getCustomizingSkinPath() . $skin_id .
'/template.xml'),
108 $this->skinFromXML($this->config->getDefaultTemplatePath()),
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Factory to create Skin classes holds an manages the basic data of a skin as provide by the template o...
__construct(Language $lng, ?ilSystemStyleConfig $config=null)
skinStyleContainerFromId(string $skin_id, ilSystemStyleMessageStack $message_stack)
Get container class is responsible for all file system related actions related actions of a skin such...
ilSystemStyleConfig $config
This class is responsible for all file system related actions related actions of a skin such as copyi...
static parseFromXMLElement(SimpleXMLElement $xml_element)
ilSkin holds an manages the basic data of a skin as provide by the template of the skin.
ilSystemStyleConfig wraps all 'constants' to ensure the testability of all classes using those 'const...
Class for advanced editing exception handling in ILIAS.
const FILE_OPENING_FAILED
Used to stack messages to be shown to the user.
if(!file_exists('../ilias.ini.php'))