19 declare(strict_types=1);
81 ILIAS_HTTP_PATH .
'/' . $this->
ctrl->getLinkTargetByClass(
82 \ilResourceCollectionGUI::class,
87 $parameters = $uri_builder->acquireParameter(
88 [self::ACTION_NAMESPACE],
92 $this->url_builder = $parameters[0];
93 $this->url_token = $parameters[1];
117 $actions[self::ACTION_DOWNLOAD] =
118 $this->ui_factory->table()->action()->single(
119 $this->
language->txt(self::ACTION_DOWNLOAD),
124 if ($this->request->canUserAdministrate()) {
125 $actions[self::ACTION_REMOVE] =
126 $this->ui_factory->table()->action()->standard(
127 $this->
language->txt(self::ACTION_REMOVE),
132 $actions[self::ACTION_UNZIP] =
133 $this->ui_factory->table()->action()->single(
134 $this->
language->txt(self::ACTION_UNZIP),
139 $actions[self::ACTION_EDIT] =
140 $this->ui_factory->table()->action()->single(
141 $this->
language->txt(self::ACTION_EDIT),
155 $revision = $this->irss->manage()->getCurrentRevision($rid);
156 $mime_type = $revision->getInformation()->getMimeType();
157 if ($index === self::ACTION_UNZIP
158 && !in_array($mime_type, [
'application/zip',
'application/x-zip-compressed'])
163 $target =
$a->getTarget();
164 $target = $this->url_builder->withURI($target)
170 if (!
$a->isAsync()) {
171 $items[] = $this->ui_factory->link()->standard(
176 $this->modals[] = $modal = $this->ui_factory->modal()->interruptive(
180 )->withAsyncRenderUrl($target->__toString());
182 $items[] = $this->ui_factory->button()->shy(
184 $modal->getShowSignal()
188 return $this->ui_factory->dropdown()->standard(
197 ILIAS_HTTP_PATH .
'/' . $this->
ctrl->getLinkTargetByClass(
198 \ilResourceCollectionGUI::class,
buildURI(string $command)
const CMD_RENDER_CONFIRM_REMOVE
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This is how the factory for UI elements looks.
Class ResourceIdentification.
buildDropDownForResource(ResourceIdentification $rid)
URLBuilderToken $url_token
__construct(private Request $request, private \ilCtrlInterface $ctrl, private Factory $ui_factory, private \ilLanguage $language, private Services $irss)
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
language()
description: > Example for rendring a language glyph.