Settings UI class for system styles.
More...
|
static | _goto ($ref_id, $params) |
|
◆ _goto()
static ilSystemStyleMainGUI::_goto |
( |
|
$ref_id, |
|
|
|
$params |
|
) |
| |
|
static |
- Parameters
-
Definition at line 176 of file class.ilSystemStyleMainGUI.php.
177 {
179
180 $node_id = $params[2];
181 $skin_id = $params[3];
182 $style_id = $params[4];
183
184 $DIC->ctrl()->setParameterByClass(
'ilSystemStyleDocumentationGUI',
'skin_id', $skin_id);
185 $DIC->ctrl()->setParameterByClass(
186 'ilSystemStyleDocumentationGUI',
187 'style_id',
188 $style_id
189 );
190 $DIC->ctrl()->setParameterByClass(
'ilSystemStyleDocumentationGUI',
'node_id', $node_id);
191 $DIC->ctrl()->setParameterByClass(
'ilSystemStyleDocumentationGUI',
'ref_id',
$ref_id);
192
193 $_GET[
'baseClass'] =
'ilAdministrationGUI';
194
195 $cmd = "entries";
196 $cmd_classes = [
197 "ilAdministrationGUI",
198 "ilObjStyleSettingsGUI",
199 "ilSystemStyleMainGUI",
200 'ilSystemStyleDocumentationGUI'
201 ];
202
203 $DIC->ctrl()->setTargetScript(
"ilias.php");
204 $DIC->ctrl()->redirectByClass($cmd_classes, $cmd);
205 }
References $_GET, $DIC, and $ref_id.
◆ checkPermission()
ilSystemStyleMainGUI::checkPermission |
( |
|
$a_perm, |
|
|
|
$a_throw_exc = true |
|
) |
| |
Checks permission for system styles.
Permissions work on two levels, ordinary rbac and the 'enable_system_styles_management' setting in the tools section of the ilias.ini.php
- Parameters
-
| $a_perm | |
bool | true | $a_throw_exc | |
- Returns
- bool
- Exceptions
-
Definition at line 216 of file class.ilSystemStyleMainGUI.php.
217 {
219
220 $has_perm = true;
221
223 if ($a_perm == "sty_management") {
224 $has_perm =
$DIC->iliasIni()->readVariable(
"tools",
"enable_system_styles_management") ==
"1" ?
true:
false;
225 $a_perm = "sty_write_system";
226 if ($has_perm && !is_writable(
$config->getCustomizingSkinPath())) {
228 $has_perm = false;
229 }
230 }
231
232 if ($has_perm) {
233 $has_perm = $this->rbacsystem->checkAccess($a_perm, $this->ref_id);
234 }
235
236 if (!$has_perm) {
237 if ($a_throw_exc) {
238 include_once "Services/Object/exceptions/class.ilObjectException.php";
240 }
241 return false;
242 }
243 return $has_perm;
244 }
Base exception class for object service.
ilSystemStyleConfig wraps all 'constants' to ensure the testability of all classes using those 'const...
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
References $config, $DIC, and ilUtil\sendFailure().
◆ setUnderworldTabs()
ilSystemStyleMainGUI::setUnderworldTabs |
( |
|
$active = "" | ) |
|
|
protected |
Sets the tab correctly if one system style is open (navigational underworld opened)
- Parameters
-
Since clearTargets also clears the help screen ids
Definition at line 251 of file class.ilSystemStyleMainGUI.php.
252 {
254 $this->tabs->clearTargets();
255
259 $DIC->help()->setScreenIdComponent(
"sty");
260 $DIC->help()->setScreenId(
"system_styles");
261 $this->tabs->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTarget($this));
264 $this->tabs->addTab('settings', $this->lng->txt('settings'), $this->ctrl->getLinkTargetByClass('ilsystemstylesettingsgui'));
265 $this->tabs->addTab('less', $this->lng->txt('less'), $this->ctrl->getLinkTargetByClass('ilsystemstylelessgui'));
266 $this->tabs->addTab('icons', $this->lng->txt('icons'), $this->ctrl->getLinkTargetByClass('ilsystemstyleiconsgui'));
267 }
268
269 $this->tabs->addTab('documentation', $this->lng->txt('documentation'), $this->ctrl->getLinkTargetByClass('ilsystemstyledocumentationgui'));
270
271 $this->tabs->activateTab($active);
272 }
References $_GET, $config, and $DIC.
◆ setUnderworldTitle()
ilSystemStyleMainGUI::setUnderworldTitle |
( |
| ) |
|
|
protected |
Sets title correctly if one system style is opened.
- Exceptions
-
Definition at line 280 of file class.ilSystemStyleMainGUI.php.
281 {
282 $skin_id =
$_GET[
"skin_id"];
283 $style_id =
$_GET[
"style_id"];
284
286 $style = $skin->getStyle($style_id);
287
288 $this->tpl->setTitle($style->getName());
289 if ($style->isSubstyle()) {
290 $this->tpl->setDescription(
291 $this->lng->txt("settings_of_substyle") . " '" . $style->getName() . "' " .
292 $this->lng->txt("of_parent") . " '" . $skin->getStyle($style->getSubstyleOf())->getName() . "' " .
293 $this->lng->txt("from_skin") . " " . $skin->getName()
294 );
295 } else {
296 $this->tpl->setDescription(
297 $this->lng->txt("settings_of_style") . " '" . $style->getName() . "' " .
298 $this->lng->txt("from_skin") . " '" . $skin->getName() . "'"
299 );
300 }
301 }
static generateFromId($skin_id, ilSystemStyleMessageStack $message_stack=null, ilSystemStyleConfig $system_styles_conf=null)
Generate the container class by parsing the corresponding XML.
References $_GET, and ilSystemStyleSkinContainer\generateFromId().
◆ $ctrl
ilSystemStyleMainGUI::$ctrl |
|
protected |
◆ $DIC
ilSystemStyleMainGUI::$DIC |
|
protected |
◆ $lng
ilSystemStyleMainGUI::$lng |
|
protected |
◆ $rbacsystem
ilSystemStyleMainGUI::$rbacsystem |
|
protected |
◆ $ref_id
ilSystemStyleMainGUI::$ref_id |
|
protected |
◆ $tabs
ilSystemStyleMainGUI::$tabs |
|
protected |
◆ $tpl
ilSystemStyleMainGUI::$tpl |
|
protected |
The documentation for this class was generated from the following file: