26use ILIAS\GlobalScreen\Scope\MainMenu\Collector\Renderer\Hasher;
61 protected \ILIAS\HTTP\Services
$http;
73 $this->irss =
$DIC->resourceStorage();
74 $this->
ctrl = $DIC->ctrl();
76 $this->
language->loadLanguageModule(
'irss');
77 $this->main_tpl =
$DIC->ui()->mainTemplate();
78 $this->
upload = $DIC->upload();
79 $this->wrapper =
$DIC->http()->wrapper();
81 $this->ui_renderer =
$DIC->ui()->renderer();
82 $this->
tabs = $DIC->tabs();
90 $this->
tabs->clearTargets();
91 $this->
tabs->setBackTarget(
93 $this->ctrl->getLinkTarget($this, self::CMD_INDEX)
99 switch ($this->
ctrl->getCmd(self::CMD_INDEX)) {
110 $this->gotoResource();
121 $this->
language->txt(
'resource_overview')
127 $this->main_tpl->setContent(
128 $this->ui_renderer->render($listing->getComponents())
133 private function gotoResource(): void
136 $this->
ctrl->saveParameter($this, ResourceListingUI::P_PAGE);
137 $this->
ctrl->saveParameter($this, ResourceListingUI::P_SORTATION);
140 $resource = $this->irss->manage()->getResource($rid);
141 $stakeholders = $resource->getStakeholders();
142 if (count($stakeholders) === 1) {
147 $this->
ctrl->redirectToURL($uri);
150 $this->main_tpl->setOnScreenMessage(
'info', $this->
language->txt(
'resource_no_stakeholder_uri'));
153 $this->main_tpl->setOnScreenMessage(
'failure',
'Multiple Stakeholders found, can\'t redirect',
true);
154 $this->
ctrl->redirect($this, self::CMD_INDEX);
163 $resource = $this->irss->manage()->getResource($rid);
167 self::CMD_SHOW_REVISIONS,
168 $this->
language->txt(
'resource_overview')
170 $view_definition->setMode(ViewDefinition::MODE_AS_TABLE);
177 $this->main_tpl->setContent(
178 $this->ui_renderer->render($listing->getComponents())
187 $this->main_tpl->setOnScreenMessage(
'failure', $this->
language->txt(
'msg_no_perm_read'),
true);
188 $this->
ctrl->redirect($this, self::CMD_INDEX);
191 $this->irss->consume()->download($rid)->run();
197 $rid = $this->wrapper->query()->has(self::P_RESOURCE_ID) ? $this->wrapper->query()->retrieve(
200 ) : ($this->wrapper->post()->has(self::P_RESOURCE_ID)
201 ? $this->wrapper->post()->retrieve(self::P_RESOURCE_ID, $this->
refinery->to()->string())
208 return $this->irss->manage()->find($rid);
Class ArrayBasedRequestWrapper.
Class ResourceCollection.
Class ResourceIdentification.
ResourceStakeholder $stakeholder
getResourceIdFromRequest()
ILIAS HTTP Services $http
ArrayBasedRequestWrapper $query
ilGlobalTemplateInterface $main_tpl
ResourceCollection $collection
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface ResourceStakeholder.
getLocationURIForResourceUsage(ResourceIdentification $identification)
An entity that renders components to a string output.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...