62 protected \ILIAS\HTTP\Services
$http;
74 $this->irss = $DIC->resourceStorage();
75 $this->
ctrl = $DIC->ctrl();
77 $this->
language->loadLanguageModule(
'irss');
78 $this->main_tpl = $DIC->ui()->mainTemplate();
79 $this->
upload = $DIC->upload();
80 $this->wrapper = $DIC->http()->wrapper();
82 $this->ui_renderer = $DIC->ui()->renderer();
83 $this->
tabs = $DIC->tabs();
91 $this->
tabs->clearTargets();
92 $this->
tabs->setBackTarget(
94 $this->
ctrl->getLinkTarget($this, self::CMD_INDEX)
100 switch ($this->
ctrl->getCmd(self::CMD_INDEX)) {
101 case self::CMD_INDEX:
104 case self::CMD_DOWNLOAD:
107 case self::CMD_SHOW_REVISIONS:
110 case self::CMD_GOTO_RESOURCE:
111 $this->gotoResource();
122 $this->
language->txt(
'resource_overview')
128 $this->main_tpl->setContent(
129 $this->ui_renderer->render($listing->getComponents())
134 private function gotoResource():
void 137 $this->
ctrl->saveParameter($this, ResourceListingUI::P_PAGE);
138 $this->
ctrl->saveParameter($this, ResourceListingUI::P_SORTATION);
141 $resource = $this->irss->manage()->getResource($rid);
142 $stakeholders = $resource->getStakeholders();
143 if (count($stakeholders) === 1) {
145 $stakeholder = array_shift($stakeholders);
148 $this->
ctrl->redirectToURL($uri);
151 $this->main_tpl->setOnScreenMessage(
'info', $this->
language->txt(
'resource_no_stakeholder_uri'));
154 $this->main_tpl->setOnScreenMessage(
'failure',
'Multiple Stakeholders found, can\'t redirect',
true);
155 $this->
ctrl->redirect($this, self::CMD_INDEX);
164 $resource = $this->irss->manage()->getResource($rid);
168 self::CMD_SHOW_REVISIONS,
169 $this->
language->txt(
'resource_overview')
171 $view_definition->
setMode(ViewDefinition::MODE_AS_TABLE);
178 $this->main_tpl->setContent(
179 $this->ui_renderer->render($listing->getComponents())
188 $this->main_tpl->setOnScreenMessage(
'failure', $this->
language->txt(
'msg_no_perm_read'),
true);
189 $this->
ctrl->redirect($this, self::CMD_INDEX);
192 $this->irss->consume()->download($rid)->run();
198 $rid = $this->wrapper->query()->has(self::P_RESOURCE_ID) ? $this->wrapper->query()->retrieve(
201 ) : ($this->wrapper->post()->has(self::P_RESOURCE_ID)
202 ? $this->wrapper->post()->retrieve(self::P_RESOURCE_ID, $this->
refinery->to()->string())
209 return $this->irss->manage()->find($rid);
ilGlobalTemplateInterface $main_tpl
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ResourceCollection.
ResourceStakeholder $stakeholder
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ArrayBasedRequestWrapper $query
Class ResourceIdentification.
ILIAS HTTP Services $http
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ResourceCollection $collection
Interface ResourceStakeholder.
language()
description: > Example for rendring a language glyph.
getLocationURIForResourceUsage(ResourceIdentification $identification)
getResourceIdFromRequest()
Class ArrayBasedRequestWrapper.