ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilObjGlossaryListGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
4
11{
12
18 public function init()
19 {
20 $this->static_link_enabled = true;
21 $this->delete_enabled = true;
22 $this->cut_enabled = true;
23 $this->copy_enabled = true;
24 $this->subscribe_enabled = true;
25 $this->link_enabled = true;
26 $this->info_screen_enabled = true;
27 $this->type = "glo";
28 $this->gui_class_name = "ilobjglossarygui";
29
30 // general commands array
31 $this->commands = ilObjGlossaryAccess::_getCommands();
32 }
33
43 public function getCommandLink($a_cmd)
44 {
45 switch ($a_cmd) {
46 case "view":
47 $cmd_link = "ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=" . $this->ref_id;
48 break;
49
50 case "edit":
51 $cmd_link = "ilias.php?baseClass=ilGlossaryEditorGUI&amp;ref_id=" . $this->ref_id;
52 break;
53
54 case "properties":
55 $this->ctrl->setParameterByClass("ilobjglossarygui", "ref_id", $this->ref_id);
56 $cmd_link = $this->ctrl->getLinkTargetByClass(array("ilglossaryeditorgui", "ilobjglossarygui"), $a_cmd);
57 break;
58
59 case "infoScreen":
60 $cmd_link = "ilias.php?baseClass=ilGlossaryPresentationGUI&amp;cmd=infoScreen&amp;ref_id=" . $this->ref_id;
61 break;
62
63 default:
64 $this->ctrl->setParameterByClass("ilrepositorygui", "ref_id", $this->ref_id);
65 $cmd_link = $this->ctrl->getLinkTargetByClass("ilrepositorygui", $a_cmd);
66 $this->ctrl->setParameterByClass("ilrepositorygui", "ref_id", $_GET["ref_id"]);
67 break;
68 }
69
70 return $cmd_link;
71 }
72
80 public function getCommandFrame($a_cmd)
81 {
82 switch ($a_cmd) {
83 case "view":
84 case "edit":
85 case "properties":
86 $frame = ilFrameTargetInfo::_getFrame("MainContent");
87 break;
88
89 default:
90 $frame = "";
91 break;
92 }
93
94 return $frame;
95 }
96
97
106 public function getProperties()
107 {
109 $rbacsystem = $this->rbacsystem;
110
111 $props = array();
112
113 if (!ilObjGlossaryAccess::_lookupOnline($this->obj_id)) {
114 $props[] = array("alert" => true, "property" => $lng->txt("status"),
115 "value" => $lng->txt("offline"));
116 }
117 return $props;
118 }
119} // END class.ilObjCategoryGUI
$_GET["client_id"]
An exception for terminatinating execution or to throw for unit testing.
static _getFrame($a_class, $a_type='')
Get content frame name.
static _getCommands()
get commands
static _lookupOnline($a_id)
check wether learning module is online
Class ilObjGlossaryListGUI.
getCommandFrame($a_cmd)
Get command target frame.
getCommandLink($a_cmd)
Overwrite this method, if link target is not build by ctrl class (e.g.
getProperties()
Get item properties.
Class ilObjectListGUI.