ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilObjGlossaryListGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2012 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5include_once "Services/Object/classes/class.ilObjectListGUI.php";
6
16{
17
23 public function init()
24 {
25 $this->static_link_enabled = true;
26 $this->delete_enabled = true;
27 $this->cut_enabled = true;
28 $this->copy_enabled = true;
29 $this->subscribe_enabled = true;
30 $this->link_enabled = true;
31 $this->info_screen_enabled = true;
32 $this->type = "glo";
33 $this->gui_class_name = "ilobjglossarygui";
34
35 // general commands array
36 include_once("./Modules/Glossary/classes/class.ilObjGlossaryAccess.php");
37 $this->commands = ilObjGlossaryAccess::_getCommands();
38 }
39
49 public function getCommandLink($a_cmd)
50 {
51 switch ($a_cmd) {
52 case "view":
53 $cmd_link = "ilias.php?baseClass=ilGlossaryPresentationGUI&amp;ref_id=" . $this->ref_id;
54 break;
55
56 case "edit":
57 $cmd_link = "ilias.php?baseClass=ilGlossaryEditorGUI&amp;ref_id=" . $this->ref_id;
58 break;
59
60 case "properties":
61 $this->ctrl->setParameterByClass("ilobjglossarygui", "ref_id", $this->ref_id);
62 $cmd_link = $this->ctrl->getLinkTargetByClass(array("ilglossaryeditorgui", "ilobjglossarygui"), $a_cmd);
63 break;
64
65 case "infoScreen":
66 $cmd_link = "ilias.php?baseClass=ilGlossaryPresentationGUI&amp;cmd=infoScreen&amp;ref_id=" . $this->ref_id;
67 break;
68
69 default:
70 $this->ctrl->setParameterByClass("ilrepositorygui", "ref_id", $this->ref_id);
71 $cmd_link = $this->ctrl->getLinkTargetByClass("ilrepositorygui", $a_cmd);
72 $this->ctrl->setParameterByClass("ilrepositorygui", "ref_id", $_GET["ref_id"]);
73 break;
74 }
75
76 return $cmd_link;
77 }
78
86 public function getCommandFrame($a_cmd)
87 {
88 switch ($a_cmd) {
89 case "view":
90 case "edit":
91 case "properties":
92 $frame = ilFrameTargetInfo::_getFrame("MainContent");
93 break;
94
95 default:
96 $frame = "";
97 break;
98 }
99
100 return $frame;
101 }
102
103
112 public function getProperties()
113 {
115 $rbacsystem = $this->rbacsystem;
116
117 $props = array();
118
119 include_once("./Modules/Glossary/classes/class.ilObjGlossaryAccess.php");
120
121 if (!ilObjGlossaryAccess::_lookupOnline($this->obj_id)) {
122 $props[] = array("alert" => true, "property" => $lng->txt("status"),
123 "value" => $lng->txt("offline"));
124 }
125 return $props;
126 }
127} // 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.