ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilObjectPluginListGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4include_once "Services/Object/classes/class.ilObjectListGUI.php";
5
14{
15
19 public function __construct($a_context = self::CONTEXT_REPOSITORY)
20 {
21 global $DIC;
22
23 parent::__construct($a_context);
24
25 $this->lng = $DIC->language();
26 $this->user = $DIC->user();
27 }
28
29
33 protected $plugin;
34
38 final public function init()
39 {
40 $this->initListActions();
41 $this->initType();
42 $this->plugin = $this->getPlugin();
43 $this->gui_class_name = $this->getGuiClass();
44 $this->commands = $this->initCommands();
45 }
46
47 abstract public function getGuiClass();
48 abstract public function initCommands();
49
55 public function setType($a_val)
56 {
57 $this->type = $a_val;
58 }
59
63 protected function getPlugin()
64 {
65 if (!$this->plugin) {
66 $this->plugin =
69 "Repository",
70 "robj",
71 ilPlugin::lookupNameForId(IL_COMP_SERVICE, "Repository", "robj", $this->getType())
72 );
73 }
74 return $this->plugin;
75 }
76
82 public function getType()
83 {
84 return $this->type;
85 }
86
87 abstract public function initType();
88
92 public function txt($a_str)
93 {
94 return $this->plugin->txt($a_str);
95 }
96
97
106 public function initItem($a_ref_id, $a_obj_id, $a_title = "", $a_description = "")
107 {
108 parent::initItem($a_ref_id, $a_obj_id, $a_title, $a_description);
109 }
110
111
119 public function getCommandFrame($a_cmd)
120 {
121 return ilFrameTargetInfo::_getFrame("MainContent");
122 }
123
132 public function getProperties()
133 {
136
137 $props = array();
138
139 return $props;
140 }
141
142
150 public function getCommandLink($a_cmd)
151 {
152
153 // separate method for this line
154 $cmd_link = "ilias.php?baseClass=ilObjPluginDispatchGUI&amp;" .
155 "cmd=forward&amp;ref_id=" . $this->ref_id . "&amp;forwardCmd=" . $a_cmd;
156
157 return $cmd_link;
158 }
159
160 protected function initListActions()
161 {
162 $this->delete_enabled = true;
163 $this->cut_enabled = true;
164 $this->subscribe_enabled = true;
165 $this->link_enabled = true;
166 $this->info_screen_enabled = true;
167 }
168}
user()
Definition: user.php:4
An exception for terminatinating execution or to throw for unit testing.
const IL_COMP_SERVICE
static _getFrame($a_class, $a_type='')
Get content frame name.
Class ilObjectListGUI.
ListGUI implementation for Example object plugin.
__construct($a_context=self::CONTEXT_REPOSITORY)
Constructor.
initItem($a_ref_id, $a_obj_id, $a_title="", $a_description="")
inititialize new item
getCommandLink($a_cmd)
Get command link url.
getProperties()
Get item properties.
getCommandFrame($a_cmd)
Get command target frame.
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get plugin object.
static lookupNameForId($a_ctype, $a_cname, $a_slot_id, $a_plugin_id)
Lookup name for id.
global $DIC
Definition: saml.php:7
$ilUser
Definition: imgupload.php:18