2include_once(
"Services/Object/exceptions/class.ilObjectException.php");
62 public function __construct()
69 $this->ctrl =
$DIC->ctrl();
70 $this->lng =
$DIC->language();
71 $this->tabs =
$DIC->tabs();
72 $this->rbacsystem =
$DIC->rbac()->system();
73 $this->tpl =
$DIC[
"tpl"];
75 $this->ref_id = (int)
$_GET[
"ref_id"];
85 public function executeCommand()
92 $next_class = $this->ctrl->getNextClass($this);
94 $ilHelp->setScreenIdComponent(
"sty");
95 $ilHelp->setScreenId(
"system_styles");
97 if (!
$_GET[
"skin_id"]) {
103 $this->ctrl->setParameterByClass(
'ilsystemstylesettingsgui',
'skin_id',
$_GET[
"skin_id"]);
104 $this->ctrl->setParameterByClass(
'ilsystemstylesettingsgui',
'style_id',
$_GET[
"style_id"]);
105 $this->ctrl->setParameterByClass(
'ilsystemstylelessgui',
'skin_id',
$_GET[
"skin_id"]);
106 $this->ctrl->setParameterByClass(
'ilsystemstylelessgui',
'style_id',
$_GET[
"style_id"]);
107 $this->ctrl->setParameterByClass(
'ilsystemstyleiconsgui',
'skin_id',
$_GET[
"skin_id"]);
108 $this->ctrl->setParameterByClass(
'ilsystemstyleiconsgui',
'style_id',
$_GET[
"style_id"]);
109 $this->ctrl->setParameterByClass(
'ilsystemstyledocumentationgui',
'skin_id',
$_GET[
"skin_id"]);
110 $this->ctrl->setParameterByClass(
'ilsystemstyledocumentationgui',
'style_id',
$_GET[
"style_id"]);
113 switch ($next_class) {
115 case "ilsystemstylesettingsgui":
116 $ilHelp->setSubScreenId(
"settings");
118 $this->setUnderworldTabs(
'settings');
120 include_once(
"Settings/class.ilSystemStyleSettingsGUI.php");
122 $this->ctrl->forwardCommand($system_styles_settings);
124 case "ilsystemstylelessgui":
125 $ilHelp->setSubScreenId(
"less");
127 $this->setUnderworldTabs(
'less');
129 include_once(
"Less/class.ilSystemStyleLessGUI.php");
131 $this->ctrl->forwardCommand($system_styles_less);
133 case "ilsystemstyleiconsgui":
134 $ilHelp->setSubScreenId(
"icons");
136 $this->setUnderworldTabs(
'icons');
138 include_once(
"Icons/class.ilSystemStyleIconsGUI.php");
140 $this->ctrl->forwardCommand($system_styles_icons);
142 case "ilsystemstyledocumentationgui":
143 $ilHelp->setSubScreenId(
"documentation");
145 $this->setUnderworldTabs(
'documentation');
147 include_once(
"Documentation/class.ilSystemStyleDocumentationGUI.php");
149 $this->ctrl->forwardCommand($system_styles_documentation);
151 case "ilsystemstyleoverviewgui":
153 $ilHelp->setSubScreenId(
"overview");
155 include_once(
"Overview/class.ilSystemStyleOverviewGUI.php");
157 $this->ctrl->forwardCommand($system_styles_overview);
163 include_once(
"Overview/class.ilSystemStyleOverviewGUI.php");
164 $this->ctrl->setCmd(
"");
166 $this->ctrl->forwardCommand($system_styles_overview);
184 $DIC->ctrl()->setParameterByClass(
'ilSystemStyleDocumentationGUI',
'skin_id', $skin_id);
185 $DIC->ctrl()->setParameterByClass(
186 'ilSystemStyleDocumentationGUI',
190 $DIC->ctrl()->setParameterByClass(
'ilSystemStyleDocumentationGUI',
'node_id', $node_id);
191 $DIC->ctrl()->setParameterByClass(
'ilSystemStyleDocumentationGUI',
'ref_id',
$ref_id);
193 $_GET[
'baseClass']=
'ilAdministrationGUI';
197 "ilAdministrationGUI",
198 "ilObjStyleSettingsGUI",
199 "ilSystemStyleMainGUI",
200 'ilSystemStyleDocumentationGUI'
203 $DIC->ctrl()->setTargetScript(
"ilias.php");
204 $DIC->ctrl()->redirectByClass($cmd_classes, $cmd);
223 if ($a_perm ==
"sty_management") {
224 $has_perm =
$ilIliasIniFile->readVariable(
"tools",
"enable_system_styles_management")==
"1" ?
true:
false;
225 $a_perm =
"sty_write_system";
226 if ($has_perm && !is_writable(
$config->getCustomizingSkinPath())) {
233 $has_perm = $this->rbacsystem->checkAccess($a_perm, $this->ref_id);
238 include_once
"Services/Object/exceptions/class.ilObjectException.php";
251 protected function setUnderworldTabs($active =
"")
257 $this->tabs->clearTargets();
262 $ilHelp->setScreenIdComponent(
"sty");
263 $ilHelp->setScreenId(
"system_styles");
264 $this->tabs->setBackTarget($this->lng->txt(
"back"), $this->ctrl->getLinkTarget($this));
267 $this->tabs->addTab(
'settings', $this->lng->txt(
'settings'), $this->ctrl->getLinkTargetByClass(
'ilsystemstylesettingsgui'));
268 $this->tabs->addTab(
'less', $this->lng->txt(
'less'), $this->ctrl->getLinkTargetByClass(
'ilsystemstylelessgui'));
269 $this->tabs->addTab(
'icons', $this->lng->txt(
'icons'), $this->ctrl->getLinkTargetByClass(
'ilsystemstyleiconsgui'));
272 $this->tabs->addTab(
'documentation', $this->lng->txt(
'documentation'), $this->ctrl->getLinkTargetByClass(
'ilsystemstyledocumentationgui'));
274 $this->tabs->activateTab($active);
285 $skin_id =
$_GET[
"skin_id"];
286 $style_id =
$_GET[
"style_id"];
289 $style = $skin->getStyle($style_id);
291 $this->tpl->setTitle(
$style->getName());
292 if (
$style->isSubstyle()) {
293 $this->tpl->setDescription(
294 $this->lng->txt(
"settings_of_substyle") .
" '" .
$style->getName() .
"' " .
295 $this->lng->txt(
"of_parent") .
" '" . $skin->getStyle(
$style->getSubstyleOf())->getName() .
"' " .
296 $this->lng->txt(
"from_skin") .
" " . $skin->getName()
299 $this->tpl->setDescription(
300 $this->lng->txt(
"settings_of_style") .
" '" .
$style->getName() .
"' " .
301 $this->lng->txt(
"from_skin") .
" '" . $skin->getName() .
"'"
An exception for terminatinating execution or to throw for unit testing.
Base exception class for object service.
ilSystemStyleConfig wraps all 'constants' to ensure the testability of all classes using those 'const...
Settings UI class for system styles.
checkPermission($a_perm, $a_throw_exc=true)
Checks permission for system styles.
setUnderworldTitle()
Sets title correctly if one system style is opened.
static generateFromId($skin_id, ilSystemStyleMessageStack $message_stack=null, ilSystemStyleConfig $system_styles_conf=null)
Generate the container class by parsing the corresponding XML.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.