19 declare(strict_types=1);
53 $this->main_tpl = $this->
ui->mainTemplate();
54 $this->ui_renderer = $this->
ui->renderer();
55 $this->ui_factory = $this->
ui->factory();
63 $is_form = count($components) === 1 && $components[0] instanceof
Form;
64 $are_interruptive = array_filter($components, fn($component):
bool => $component instanceof
KeyValue) !== [];
66 $modal = match (
true) {
67 $is_form => $this->ui_factory->modal()->roundtrip(
73 $are_interruptive => $this->ui_factory->modal()->interruptive(
75 $this->translator->translate(
'confirm_delete'),
79 fn(KeyValue $item): \
ILIAS\
UI\
Component\Modal\InterruptiveItem\KeyValue => $this->ui_factory->modal()->interruptiveItem()->keyValue(
87 default => $this->ui_factory->modal()->roundtrip(
100 $components = array_filter($components, fn($component):
bool => $component !==
null);
101 $string = $this->ui_renderer->renderAsync($components);
108 $this->
http->sendResponse();
109 $this->
http->close();
114 $components = array_filter($components, fn($component):
bool => $component !==
null);
116 $this->main_tpl->setContent(
117 $this->ui_renderer->render($components)
122 $components = array_filter($components, fn($component):
bool => $component !==
null);
124 return $this->ui_renderer->render($components);
129 $this->tabs_gui->addTab(
131 $this->translator->translate(
'groups'),
132 $this->
ctrl->getLinkTargetByClass(
133 ilObjFooterAdministrationGUI::class,
137 $this->tabs_gui->addTab(
139 $this->translator->translate(
'perm_settings'),
140 $this->
ctrl->getLinkTargetByClass([ilObjFooterAdministrationGUI::class, ilPermissionGUI::class],
'perm')
146 $this->tabs_gui->clearTargets();
150 && $this->
ctrl->getCmdClass() === strtolower(ilFooterEntriesGUI::class)
152 $this->tabs_gui->setBackTarget(
153 $this->translator->translate(
'back'),
154 $this->
ctrl->getLinkTargetByClass(
155 ilFooterEntriesGUI::class,
162 $this->tabs_gui->setBackTarget(
163 $this->translator->translate(
'back'),
164 $this->
ctrl->getLinkTargetByClass(
165 ilObjFooterAdministrationGUI::class,
173 $this->tabs_gui->activateTab($tab);
178 $this->require(
'read');
183 $this->require(
'write');
188 return $this->rbac_system->checkAccess($permissions, $this->ref_id);
191 public function require(
string $permissions):
void 194 $this->error->raiseError($this->translator->translate(
'msg_no_perm_read'), $this->error->WARNING);
198 public function getHereAsURI(?
string $cmd =
null):
URI 200 $uri =
new URI((
string) $this->
http->request()->getUri());
202 return $uri->withParameter(
'cmd', $cmd);
206 public function buildURI(
string $from_path):
URI 208 $request = $this->
http->request()->getUri();
209 return new URI($request->getScheme() .
'://' . $request->getHost() .
'/' . ltrim($from_path,
'/'));
212 public function sendMessageAndRedirect(
217 $this->main_tpl->setOnScreenMessage(
222 $this->
ctrl->redirectToURL($target);
225 public function saveIdentificationsToRequest(
226 object|
string $gui_class,
231 $this->
ctrl->setParameterByClass(
232 is_object($gui_class) ? $gui_class::class : $gui_class,
238 public function getIdentificationsFromRequest(
string|
URLBuilderToken $token): array
240 if ($token ===
null) {
244 $query_params = $this->
http->request()->getQueryParams();
246 $ids = $query_params[$name] ?? [];
247 $ids = is_array($ids) ? $ids : [$ids];
250 if (($ids[0] ??
null) ===
'ALL_OBJECTS') {
255 if (($interruptive_items = $this->
http->request()->getParsedBody()[
'interruptive_items'] ??
false)) {
256 foreach ($interruptive_items as $interruptive_item) {
257 $ids[] = $interruptive_item;
getName()
Get the full name of the token including its namespace.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface Observer Contains several chained tasks and infos about them.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
Provides fluid interface to RBAC services.
getValue()
The value string that will be displayed behind the label of the node.
static http()
Fetches the global http state from ILIAS.
This is how the factory for UI elements looks.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins