19 declare(strict_types=1);
67 $this->
ctrl = $DIC->ctrl();
68 $this->
lng = $DIC->language();
69 $this->
tabs = $DIC->tabs();
70 $this->rbacsystem = $DIC->rbac()->system();
71 $this->tpl = $DIC->ui()->mainTemplate();
72 $this->
help = $DIC->help();
73 $this->ui_factory = $DIC->ui()->factory();
74 $this->renderer = $DIC->ui()->renderer();
75 $this->
locator = $DIC[
'ilLocator'];
77 $this->global_screen = $DIC->globalScreen();
78 $this->request_wrapper = $DIC->http()->wrapper();
80 $this->request = $DIC->http()->request();
81 $this->
toolbar = $DIC->toolbar();
82 $this->
upload = $DIC->upload();
83 $this->tree = $DIC->repositoryTree();
85 $this->
user = $DIC->user();
88 $this->ref_id = $this->request_wrapper->query()->retrieve(
'ref_id', $this->
refinery->kindlyTo()->string());
97 $next_class = $this->
ctrl->getNextClass($this);
99 $this->
help->setScreenIdComponent(
'sty');
100 $this->
help->setScreenId(
'system_styles');
105 if ($this->request_wrapper->query()->has(
'skin_id') && $this->request_wrapper->query()->has(
'style_id')) {
106 $skin_id = $this->request_wrapper->query()->retrieve(
'skin_id', $this->
refinery->kindlyTo()->string());
107 $style_id = $this->request_wrapper->query()->retrieve(
'style_id', $this->
refinery->kindlyTo()->string());
109 $skin_id = $config->getDefaultSkinId();
110 $style_id = $config->getDefaultStyleId();
113 $this->
ctrl->setParameterByClass(ilSystemStyleConfigGUI::class,
'skin_id', $skin_id);
114 $this->
ctrl->setParameterByClass(ilSystemStyleConfigGUI::class,
'style_id', $style_id);
115 $this->
ctrl->setParameterByClass(ilSystemStyleScssGUI::class,
'skin_id', $skin_id);
116 $this->
ctrl->setParameterByClass(ilSystemStyleScssGUI::class,
'style_id', $style_id);
117 $this->
ctrl->setParameterByClass(ilSystemStyleIconsGUI::class,
'skin_id', $skin_id);
118 $this->
ctrl->setParameterByClass(ilSystemStyleIconsGUI::class,
'style_id', $style_id);
119 $this->
ctrl->setParameterByClass(ilSystemStyleDocumentationGUI::class,
'skin_id', $skin_id);
120 $this->
ctrl->setParameterByClass(ilSystemStyleDocumentationGUI::class,
'style_id', $style_id);
123 switch ($next_class) {
124 case strtolower(ilSystemStyleConfigGUI::class):
125 $this->
help->setSubScreenId(
'settings');
137 $this->request_wrapper,
146 $this->
ctrl->forwardCommand($system_styles_settings);
148 case strtolower(ilSystemStyleScssGUI::class):
149 $this->
help->setSubScreenId(
'scss');
166 $this->
ctrl->forwardCommand($system_styles_scss);
168 case strtolower(ilSystemStyleIconsGUI::class):
169 $this->
help->setSubScreenId(
'icons');
179 $this->request_wrapper,
188 $this->
ctrl->forwardCommand($system_styles_icons);
190 case strtolower(ilSystemStyleDocumentationGUI::class):
191 $this->
help->setSubScreenId(
'documentation');
196 if ($this->request_wrapper->query()->has(
'node_id')) {
197 $node_id = $this->request_wrapper->query()->retrieve(
199 $this->
refinery->kindlyTo()->string()
203 $this->global_screen->tool()->context()->current()->addAdditionalData(
207 $this->tpl->setPermanentLink(
'stys', (
int) $this->ref_id, $goto_link);
208 $entries =
new Entries();
216 $documentation_gui->show($entries, $node_id);
218 case strtolower(ilSystemStyleOverviewGUI::class):
228 $this->message_stack->sendMessages();
235 $this->
help->setSubScreenId(
'overview');
245 $this->request_wrapper,
259 $this->
ctrl->forwardCommand($system_styles_overview);
272 if ($a_perm ==
'sty_management') {
274 $a_perm =
'sty_write_system';
275 if ($has_perm && !is_writable($config->getCustomizingSkinPath())) {
277 $this->
lng->txt(
'enable_system_styles_management_no_write_perm'),
280 $this->message_stack->sendMessages();
286 $has_perm = $this->rbacsystem->checkAccess($a_perm, (
int) $this->ref_id);
302 protected function setUnderworldTabs(
string $sking_id,
string $active =
'',
bool $read_only =
false): void
304 $this->
tabs->clearTargets();
308 $this->tpl->setLocator();
315 $this->
help->setScreenIdComponent(
'sty');
316 $this->
help->setScreenId(
'system_styles');
317 $this->
tabs->setBackTarget($this->
lng->txt(
'back'), $this->
ctrl->getLinkTarget($this));
319 if ($sking_id != $config->getDefaultSkinId()) {
322 $this->
lng->txt(
'settings'),
323 $this->
ctrl->getLinkTargetByClass(
'ilsystemstyleconfiggui')
327 $this->
lng->txt(
'scss'),
328 $this->
ctrl->getLinkTargetByClass(
'ilsystemstylescssgui')
332 $this->
lng->txt(
'icons'),
333 $this->
ctrl->getLinkTargetByClass(
'ilsystemstyleiconsgui')
339 $this->
lng->txt(
'documentation'),
340 $this->
ctrl->getLinkTargetByClass(ilSystemStyleDocumentationGUI::class)
343 $this->
tabs->activateTab($active);
350 protected function setUnderworldTitle(
string $skin_id,
string $style_id,
bool $read_only =
false): void
352 $skin = $this->skin_factory->skinStyleContainerFromId($skin_id, $this->message_stack)->getSkin();
353 $style = $skin->getStyle($style_id);
356 $this->tpl->setTitle($this->
lng->txt(
'documentation'));
358 if ($style->isSubstyle()) {
359 $this->tpl->setDescription(
360 $this->
lng->txt(
'ks_documentation_of_substyle')
362 . $style->getName() .
"' " .
363 $this->
lng->txt(
'of_parent') .
" '" . $skin->getStyle($style->getSubstyleOf())->getName() .
"' " .
364 $this->
lng->txt(
'from_skin') .
' ' . $skin->getName()
367 $this->tpl->setDescription(
368 $this->
lng->txt(
'ks_documentation_of_style') .
" '" . $style->getName() .
"' " .
369 $this->
lng->txt(
'from_skin') .
" '" . $skin->getName() .
"'" 373 $this->tpl->setTitle($style->getName());
374 if ($style->isSubstyle()) {
375 $this->tpl->setDescription(
376 $this->
lng->txt(
'settings_of_substyle') .
" '" . $style->getName() .
"' " .
377 $this->
lng->txt(
'of_parent') .
" '" . $skin->getStyle($style->getSubstyleOf())->getName() .
"' " .
378 $this->
lng->txt(
'from_skin') .
' ' . $skin->getName()
381 $this->tpl->setDescription(
382 $this->
lng->txt(
'settings_of_style') .
" '" . $style->getName() .
"' " .
383 $this->
lng->txt(
'from_skin') .
" '" . $skin->getName() .
"'"
An entity that renders components to a string output.
ilGlobalTemplateInterface $tpl
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Factory to create Skin classes holds an manages the basic data of a skin as provide by the template o...
ilSystemStyleMessageStack $message_stack
Container storing a list of UI Component Entries, can act as Iterator, countable and is serializable...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
WrapperFactory $request_wrapper
setUnderworldTitle(string $skin_id, string $style_id, bool $read_only=false)
Sets title correctly if one system style is opened.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilSkinFactory $skin_factory
setUnderworldTabs(string $sking_id, string $active='', bool $read_only=false)
Sets the tab correctly if one system style is open (navigational underworld opened) ...
RefineryFactory $refinery
checkPermission(string $a_perm, bool $a_throw_exc=true)
Checks permission for system styles.
Generatates and reads Goto Links.
Renders the Overview of the Examples in the Administration.
Settings UI class for system styles.
executeCommand()
Main routing of the system styles.
ilSystemStyleConfig wraps all 'constants' to ensure the testability of all classes using those 'const...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Used to stack messages to be shown to the user.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
readVariable(string $a_group, string $a_var_name)
reads a single variable from a group
executeDefaultCommand(ilSkinFactory $skin_factory, string $skin_id, string $style_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ServerRequestInterface $request