ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilLinkResourceHandlerGUI.php
Go to the documentation of this file.
1<?php
2/*
3 +-----------------------------------------------------------------------------+
4 | ILIAS open source |
5 +-----------------------------------------------------------------------------+
6 | Copyright (c) 1998-2005 ILIAS open source, University of Cologne |
7 | |
8 | This program is free software; you can redistribute it and/or |
9 | modify it under the terms of the GNU General Public License |
10 | as published by the Free Software Foundation; either version 2 |
11 | of the License, or (at your option) any later version. |
12 | |
13 | This program is distributed in the hope that it will be useful, |
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | GNU General Public License for more details. |
17 | |
18 | You should have received a copy of the GNU General Public License |
19 | along with this program; if not, write to the Free Software |
20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21 +-----------------------------------------------------------------------------+
22*/
23
24
36{
37 public function __construct()
38 {
39 global $DIC;
40
41 $ilCtrl = $DIC['ilCtrl'];
42 $lng = $DIC['lng'];
43 $ilAccess = $DIC['ilAccess'];
44 $ilias = $DIC['ilias'];
45 $ilNavigationHistory = $DIC['ilNavigationHistory'];
46
47 // initialisation stuff
48 $this->ctrl = &$ilCtrl;
49 }
50
54 public function executeCommand()
55 {
56 global $DIC;
57
58 $lng = $DIC['lng'];
59 $ilAccess = $DIC['ilAccess'];
60 $tpl = $DIC['tpl'];
61 $ilNavigationHistory = $DIC['ilNavigationHistory'];
62
63 $cmd = $this->ctrl->getCmd();
64 $next_class = $this->ctrl->getNextClass($this);
65 if ($next_class == "") {
66 $this->ctrl->setCmdClass("ilobjlinkresourcegui");
67 $next_class = $this->ctrl->getNextClass($this);
68 }
69
70 // add entry to navigation history
71 if ($ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
72 $ilNavigationHistory->addItem(
73 $_GET["ref_id"],
74 "ilias.php?baseClass=ilLinkResourceHandlerGUI&cmd=infoScreen&ref_id=" . $_GET["ref_id"],
75 "webr"
76 );
77 }
78
79 switch ($next_class) {
80 case 'ilobjlinkresourcegui':
81 require_once "./Modules/WebResource/classes/class.ilObjLinkResourceGUI.php";
83 $this->ctrl->forwardCommand($link_gui);
84 break;
85 }
86
87 $tpl->show();
88 }
89}
$tpl
Definition: ilias.php:10
$_GET["client_id"]
An exception for terminatinating execution or to throw for unit testing.
Handles user interface for link resources.
Class ilObjLinkResourceGUI.
global $ilCtrl
Definition: ilias.php:18
global $DIC
Definition: saml.php:7
$lng