Settings UI class for system styles.
More...
◆ __construct()
ilSystemStyleMainGUI::__construct |
( |
| ) |
|
Constructor.
Definition at line 62 of file class.ilSystemStyleMainGUI.php.
References $_GET, and $DIC.
66 $this->ctrl = $DIC->ctrl();
67 $this->lng = $DIC->language();
68 $this->tabs = $DIC->tabs();
69 $this->rbacsystem = $DIC->rbac()->system();
70 $this->tpl = $DIC[
"tpl"];
72 $this->ref_id = (int)
$_GET[
"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 159 of file class.ilSystemStyleMainGUI.php.
References $config, $ilIliasIniFile, and ilUtil\sendFailure().
Referenced by executeCommand().
166 if($a_perm ==
"sty_management"){
167 $has_perm = $ilIliasIniFile->readVariable(
"tools",
"enable_system_styles_management")==
"1" ?
true:
false;
168 $a_perm =
"sty_write_system";
169 if($has_perm && ! is_writable(
$config->getCustomizingSkinPath())){
176 $has_perm = $this->rbacsystem->checkAccess($a_perm, $this->ref_id);
183 include_once
"Services/Object/exceptions/class.ilObjectException.php";
Base exception class for object service.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
ilSystemStyleConfig wraps all 'constants' to ensure the testability of all classes using those 'const...
◆ executeCommand()
ilSystemStyleMainGUI::executeCommand |
( |
| ) |
|
Main routing of the system styles.
Resets ilCtrl Parameter for all subsequent generation of links.
- Exceptions
-
Definition at line 82 of file class.ilSystemStyleMainGUI.php.
References $_GET, checkPermission(), ilUtil\sendFailure(), setUnderworldTabs(), and setUnderworldTitle().
84 $next_class = $this->ctrl->getNextClass($this);
86 $this->ctrl->setParameterByClass(
'ilsystemstylesettingsgui',
'skin_id',
$_GET[
"skin_id"]);
87 $this->ctrl->setParameterByClass(
'ilsystemstylesettingsgui',
'style_id',
$_GET[
"style_id"]);
88 $this->ctrl->setParameterByClass(
'ilsystemstylelessgui',
'skin_id',
$_GET[
"skin_id"]);
89 $this->ctrl->setParameterByClass(
'ilsystemstylelessgui',
'style_id',
$_GET[
"style_id"]);
90 $this->ctrl->setParameterByClass(
'ilsystemstyleiconsgui',
'skin_id',
$_GET[
"skin_id"]);
91 $this->ctrl->setParameterByClass(
'ilsystemstyleiconsgui',
'style_id',
$_GET[
"style_id"]);
92 $this->ctrl->setParameterByClass(
'ilsystemstyledocumentationgui',
'skin_id',
$_GET[
"skin_id"]);
93 $this->ctrl->setParameterByClass(
'ilsystemstyledocumentationgui',
'style_id',
$_GET[
"style_id"]);
99 case "ilsystemstylesettingsgui":
103 include_once(
"Settings/class.ilSystemStyleSettingsGUI.php");
105 $this->ctrl->forwardCommand($system_styles_settings);
107 case "ilsystemstylelessgui":
111 include_once(
"Less/class.ilSystemStyleLessGUI.php");
113 $this->ctrl->forwardCommand($system_styles_less);
115 case "ilsystemstyleiconsgui":
119 include_once(
"Icons/class.ilSystemStyleIconsGUI.php");
121 $this->ctrl->forwardCommand($system_styles_icons);
123 case "ilsystemstyledocumentationgui":
127 include_once(
"Documentation/class.ilSystemStyleDocumentationGUI.php");
129 $this->ctrl->forwardCommand($system_styles_documentation);
131 case "ilsystemstyleoverviewgui":
134 include_once(
"Overview/class.ilSystemStyleOverviewGUI.php");
137 $this->ctrl->forwardCommand($system_styles_overview);
143 include_once(
"Overview/class.ilSystemStyleOverviewGUI.php");
144 $this->ctrl->setCmd(
"");
146 $this->ctrl->forwardCommand($system_styles_overview);
setUnderworldTitle()
Sets title correctly if one system style is opened.
Base exception class for object service.
checkPermission($a_perm, $a_throw_exc=true)
Checks permission for system styles.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
setUnderworldTabs($active="")
Sets the tab correctly if one system style is open (navigational underworld opened) ...
◆ setUnderworldTabs()
ilSystemStyleMainGUI::setUnderworldTabs |
( |
|
$active = "" | ) |
|
|
protected |
Sets the tab correctly if one system style is open (navigational underworld opened)
- Parameters
-
Definition at line 196 of file class.ilSystemStyleMainGUI.php.
Referenced by executeCommand().
197 $this->tabs->clearTargets();
199 $this->tabs->setBackTarget($this->lng->txt(
"back"),$this->ctrl->getLinkTarget($this));
200 $this->tabs->addTab(
'settings', $this->lng->txt(
'settings'), $this->ctrl->getLinkTargetByClass(
'ilsystemstylesettingsgui'));
201 $this->tabs->addTab(
'less', $this->lng->txt(
'less'), $this->ctrl->getLinkTargetByClass(
'ilsystemstylelessgui'));
202 $this->tabs->addTab(
'icons', $this->lng->txt(
'icons'), $this->ctrl->getLinkTargetByClass(
'ilsystemstyleiconsgui'));
203 $this->tabs->addTab(
'documentation', $this->lng->txt(
'documentation'), $this->ctrl->getLinkTargetByClass(
'ilsystemstyledocumentationgui'));
205 $this->tabs->activateTab($active);
◆ setUnderworldTitle()
ilSystemStyleMainGUI::setUnderworldTitle |
( |
| ) |
|
|
protected |
Sets title correctly if one system style is opened.
- Exceptions
-
Definition at line 214 of file class.ilSystemStyleMainGUI.php.
References $_GET, $style, and ilSystemStyleSkinContainer\generateFromId().
Referenced by executeCommand().
215 $skin_id =
$_GET[
"skin_id"];
216 $style_id =
$_GET[
"style_id"];
219 $style = $skin->getStyle($style_id);
221 $this->tpl->setTitle(
$style->getName());
223 $this->tpl->setDescription($this->lng->txt(
"settings_of_substyle").
" '".
$style->getName().
"' ".
224 $this->lng->txt(
"of_parent").
" '".$skin->getStyle(
$style->getSubstyleOf())->getName().
"' ".
225 $this->lng->txt(
"from_skin").
" ".$skin->getName()
228 $this->tpl->setDescription($this->lng->txt(
"settings_of_style").
" '".
$style->getName().
"' ".
229 $this->lng->txt(
"from_skin").
" '".$skin->getName().
"'"
static generateFromId($skin_id, ilSystemStyleMessageStack $message_stack=null, ilSystemStyleConfig $system_styles_conf=null)
Generate the container class by parsing the corresponding XML.
◆ $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: