19declare(strict_types=1);
26use Psr\Http\Message\ServerRequestInterface;
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->ui()->mainTemplate();
71 $this->
help = $DIC->help();
72 $this->ui_factory =
$DIC->ui()->factory();
73 $this->
renderer = $DIC->ui()->renderer();
74 $this->
locator = $DIC[
'ilLocator'];
76 $this->global_screen =
$DIC->globalScreen();
77 $this->request_wrapper =
$DIC->http()->wrapper();
79 $this->request =
$DIC->http()->request();
80 $this->
toolbar = $DIC->toolbar();
81 $this->
upload = $DIC->upload();
82 $this->tree =
$DIC->repositoryTree();
84 $this->
user = $DIC->user();
87 $this->ref_id = $this->request_wrapper->query()->retrieve(
'ref_id', $this->
refinery->kindlyTo()->string());
96 $next_class = $this->
ctrl->getNextClass($this);
98 $this->
help->setScreenIdComponent(
'sty');
99 $this->
help->setScreenId(
'system_styles');
104 if ($this->request_wrapper->query()->has(
'skin_id') && $this->request_wrapper->query()->has(
'style_id')) {
105 $skin_id = $this->request_wrapper->query()->retrieve(
'skin_id', $this->
refinery->kindlyTo()->string());
106 $style_id = $this->request_wrapper->query()->retrieve(
'style_id', $this->
refinery->kindlyTo()->string());
108 $skin_id = $config->getDefaultSkinId();
109 $style_id = $config->getDefaultStyleId();
112 $this->
ctrl->setParameterByClass(ilSystemStyleConfigGUI::class,
'skin_id', $skin_id);
113 $this->
ctrl->setParameterByClass(ilSystemStyleConfigGUI::class,
'style_id', $style_id);
114 $this->
ctrl->setParameterByClass(ilSystemStyleDocumentationGUI::class,
'skin_id', $skin_id);
115 $this->
ctrl->setParameterByClass(ilSystemStyleDocumentationGUI::class,
'style_id', $style_id);
118 switch ($next_class) {
119 case strtolower(ilSystemStyleConfigGUI::class):
120 $this->
help->setSubScreenId(
'settings');
132 $this->request_wrapper,
141 $this->
ctrl->forwardCommand($system_styles_settings);
143 case strtolower(ilSystemStyleDocumentationGUI::class):
144 $this->
setTabs($skin_id, $style_id);
145 $this->
tabs->activateSubTab(
'documentation');
146 $this->
help->setSubScreenId(
'documentation');
149 if ($this->request_wrapper->query()->has(
'node_id')) {
150 $node_id = $this->request_wrapper->query()->retrieve(
152 $this->
refinery->kindlyTo()->string()
156 $this->global_screen->tool()->context()->current()->addAdditionalData(
160 $this->tpl->setPermanentLink(
'stys', (
int)
$this->ref_id, $goto_link);
161 $entries =
new Entries();
162 $entries->addEntriesFromArray(require ilKitchenSinkDataCollectedObjective::PATH());
169 $documentation_gui->show($entries, $node_id);
171 case strtolower(ilSystemStyleOverviewGUI::class):
181 $this->message_stack->sendMessages();
188 $this->
help->setSubScreenId(
'overview');
189 $this->
setTabs($skin_id, $style_id);
190 $this->
tabs->activateSubTab(
'overview');
193 $management_enabled =
true;
200 $this->request_wrapper,
214 $this->
ctrl->forwardCommand($system_styles_overview);
223 $has_perm = $this->rbacsystem->checkAccess($a_perm, (
int) $this->ref_id);
234 protected function setTabs(
string $skin_id,
string $style_id,
string $active =
'') {
235 $this->
ctrl->setParameterByClass(ilSystemStyleDocumentationGUI::class,
'skin_id', $skin_id);
236 $this->
ctrl->setParameterByClass(ilSystemStyleDocumentationGUI::class,
'style_id', $style_id);
238 $this->
tabs->addSubTab(
240 $this->
lng->txt(
'overview'),
241 $this->ctrl->getLinkTargetByClass(self::class),
'documentation');
242 $this->
tabs->addSubTab(
'documentation',
243 $this->
lng->txt(
'documentation'),
244 $this->ctrl->getLinkTargetByClass(ilSystemStyleDocumentationGUI::class,
'entries')
252 protected function setUnderworldTabs(
string $sking_id,
string $active =
'',
bool $read_only =
false): void
254 $this->
tabs->clearTargets();
258 $this->tpl->setLocator();
262 $this->
help->setScreenIdComponent(
'sty');
263 $this->
help->setScreenId(
'system_styles');
264 $this->
tabs->setBackTarget($this->
lng->txt(
'back'), $this->ctrl->getLinkTarget($this));
268 $this->
lng->txt(
'settings'),
269 $this->ctrl->getLinkTargetByClass(
'ilsystemstyleconfiggui')
272 $this->
tabs->activateTab($active);
281 $skin = $this->skin_factory->skinStyleContainerFromId($skin_id, $this->message_stack)->getSkin();
282 $style = $skin->getStyle($style_id);
284 $this->tpl->setTitle($style->getName());
285 if ($style->isSubstyle()) {
286 $this->tpl->setDescription(
287 $this->
lng->txt(
'settings_of_substyle') .
" '" . $style->getName() .
"' " .
288 $this->lng->txt(
'of_parent') .
" '" . $skin->getStyle($style->getSubstyleOf())->getName() .
"' " .
289 $this->lng->txt(
'from_skin') .
' ' . $skin->getName()
292 $this->tpl->setDescription(
293 $this->
lng->txt(
'settings_of_style') .
" '" . $style->getName() .
"' " .
294 $this->lng->txt(
'from_skin') .
" '" . $skin->getName() .
"'"
Builds a Color from either hex- or rgb values.
Container storing a list of UI Component Entries, can act as Iterator, countable and is serializable.
Class ilCtrl provides processing control methods.
INIFile Parser Early access in init proceess! Avoid further dependencies like logging or other servic...
Generatates and reads Goto Links.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Base exception class for object service.
class ilRbacSystem system function like checkAccess, addActiveRole ... Supporting system functions ar...
Factory to create Skin classes holds an manages the basic data of a skin as provide by the template o...
ilSystemStyleConfig wraps all 'constants' to ensure the testability of all classes using those 'const...
Renders the Overview of the Examples in the Administration.
Settings UI class for system styles.
ilSkinFactory $skin_factory
executeDefaultCommand(ilSkinFactory $skin_factory, string $skin_id, string $style_id)
setUnderworldTabs(string $sking_id, string $active='', bool $read_only=false)
Sets the tab correctly if one system style is open (navigational underworld opened)
ilSystemStyleMessageStack $message_stack
setUnderworldTitle(string $skin_id, string $style_id, string $active)
Sets title correctly if one system style is opened.
checkPermission(string $a_perm, bool $a_throw_exc=true)
Checks permission for system styles.
ilGlobalTemplateInterface $tpl
executeCommand()
Main routing of the system styles.
WrapperFactory $request_wrapper
setTabs(string $skin_id, string $style_id, string $active='')
ServerRequestInterface $request
RefineryFactory $refinery
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...
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
This is how the factory for UI elements looks.
An entity that renders components to a string output.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc