52 private readonly
Group $group,
56 private bool $write_access =
false 59 $this->ui_factory = $DIC->ui()->factory();
60 $this->request = $DIC->http()->request();
61 $this->collector = $DIC->globalScreen()->collector()->footer();
62 $this->identification = $DIC->globalScreen()->identification();
67 $ok = $this->ok($this->ui_factory);
68 $nok = $this->nok($this->ui_factory);
70 foreach ($this->
repository->allForParent($this->group->getId()) as $entry) {
71 if ($entry->isCore()) {
72 $title = $this->collector->getSingleItemFromRaw(
73 $this->identification->fromSerializedIdentification($entry->getId()),
76 $title = $this->translations_repository->get($entry)->getDefault()?->getTranslation(
77 ) ?? $entry->getTitle();
81 $this->
hash($entry->getId()),
83 self::COLUMN_TITLE => $title,
84 self::COLUMN_ACTIVE => $entry->isActive() ? $ok : $nok,
88 if (!$this->write_access || $entry->isCore()) {
89 $row = $row->withDisabledAction(
'delete')
90 ->withDisabledAction(
'edit')
91 ->withDisabledAction(
'translate')
92 ->withDisabledAction(
'move');
94 if (!$this->write_access) {
95 $row = $row->withDisabledAction(
'toggle_activation');
104 URI $translations_uri
108 return $this->ui_factory
111 $this->group->getTitle(),
113 self::COLUMN_TITLE => $this->ui_factory->table()->column()->text(
114 $this->translator->translate(
'title',
'entry')
116 self::COLUMN_ACTIVE => $this->ui_factory->table()->column()->statusIcon(
117 $this->translator->translate(
'active',
'entry')
123 ->withRequest($this->request)
126 'edit' => $this->ui_factory->table()->action()->single(
127 $this->translator->translate(
'edit',
'entry'),
128 $uri_builder->withURI($here_uri->
withParameter(
'cmd',
'edit')),
132 'toggle_activation' => $this->ui_factory->table()->action()->standard(
133 $this->translator->translate(
'toggle_activation',
'entry'),
134 $uri_builder->withURI($here_uri->
withParameter(
'cmd',
'toggleActivation')),
138 'delete' => $this->ui_factory->table()->action()->standard(
139 $this->translator->translate(
'delete',
'entry'),
140 $uri_builder->withURI($here_uri->
withParameter(
'cmd',
'confirmDelete')),
144 'move' => $this->ui_factory->table()->action()->standard(
145 $this->translator->translate(
'move',
'entry'),
146 $uri_builder->withURI($here_uri->
withParameter(
'cmd',
'selectMove')),
150 'translate' => $this->ui_factory->table()->action()->single(
151 $this->translator->translate(
'translate',
'group'),
152 $uri_builder->withURI(
153 $translations_uri->withParameter(
'async',
'true')->withParameter(
171 $query_params_namespace = [
'gsfo'];
173 $query_params_namespace,
repository()
description: > Example for rendering a repository card
This describes a Table to specify the order of its data (rows).
This is how the factory for UI elements looks.
The scope of this class is split ilias-conform URI's into components.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class IdentificationFactory All elements in the GlobalScreen service must be identifiable for the sup...
buildOrderingRow(string $id, array $record)
withParameter(string $key, $value)
Get URI with modified parameters.