ILIAS  release_8 Revision v8.25-1-g13de6a5eca6
class.ilLinkResourceHandlerGUI.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
21use ILIAS\HTTP\Services as HTTPService;
22use ILIAS\Refinery\Factory as Refinery;
23
32{
33 protected Refinery $refinery;
34 protected HTTPService $http;
36 protected ilLanguage $lng;
40
41 public function __construct()
42 {
43 global $DIC;
44
45 $this->ctrl = $DIC->ctrl();
46 $this->lng = $DIC->language();
47 $this->access = $DIC->access();
48 $this->navigationHistory = $DIC['ilNavigationHistory'];
49 $this->http = $DIC->http();
50 $this->refinery = $DIC->refinery();
51 $this->tpl = $DIC->ui()->mainTemplate();
52 }
53
54 public function executeCommand(): void
55 {
56 global $DIC;
57
58 $ref_id = $this->http->wrapper()->query()->has('ref_id') ?
59 $this->http->wrapper()->query()->retrieve(
60 'ref_id',
61 $this->refinery->kindlyTo()->int()
62 ) : 0;
63
64 $next_class = $this->ctrl->getNextClass($this);
65 if ($next_class == "") {
66 $this->ctrl->setCmdClass(ilObjLinkResourceGUI::class);
67 $next_class = $this->ctrl->getNextClass($this);
68 }
69 if ($this->access->checkAccess("read", "", $ref_id)) {
70 $this->navigationHistory->addItem(
71 $ref_id,
72 "ilias.php?baseClass=ilLinkResourceHandlerGUI&cmd=infoScreen&ref_id=" . $ref_id,
73 "webr"
74 );
75 }
76 switch ($next_class) {
77 case 'ilobjlinkresourcegui':
78 $link_gui = new ilObjLinkResourceGUI(
79 $ref_id,
81 );
82 $this->ctrl->forwardCommand($link_gui);
83 break;
84 }
85 $this->tpl->printToStdout();
86 }
87}
Builds data types.
Definition: Factory.php:21
Class Services.
Definition: Services.php:38
language handling
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Navigation History of Repository Items.
Class ilObjLinkResourceGUI.
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface ilCtrlBaseClassInterface describes ilCtrl base classes.
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...
$ref_id
Definition: ltiauth.php:67
static http()
Fetches the global http state from ILIAS.