ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 protected $plugin;
20
24 final function init()
25 {
26 $this->initListActions();
27 $this->initType();
28 $this->plugin = $this->getPlugin();
29 $this->gui_class_name = $this->getGuiClass();
30 $this->commands = $this->initCommands();
31 }
32
33 abstract function getGuiClass();
34 abstract function initCommands();
35
41 function setType($a_val)
42 {
43 $this->type = $a_val;
44 }
45
49 protected function getPlugin() {
50 if(!$this->plugin) {
51 $this->plugin =
52 ilPlugin::getPluginObject(IL_COMP_SERVICE, "Repository", "robj",
53 ilPlugin::lookupNameForId(IL_COMP_SERVICE, "Repository", "robj", $this->getType()));
54 }
55 return $this->plugin;
56 }
57
63 function getType()
64 {
65 return $this->type;
66 }
67
68 abstract function initType();
69
73 function txt($a_str)
74 {
75 return $this->plugin->txt($a_str);
76 }
77
78
87 function initItem($a_ref_id, $a_obj_id, $a_title = "", $a_description = "")
88 {
89 parent::initItem($a_ref_id, $a_obj_id, $a_title, $a_description);
90 }
91
92
100 function getCommandFrame($a_cmd)
101 {
102 return ilFrameTargetInfo::_getFrame("MainContent");
103 }
104
113 function getProperties()
114 {
115 global $lng, $ilUser;
116
117 $props = array();
118
119 return $props;
120 }
121
122
130 function getCommandLink($a_cmd)
131 {
132
133 // separate method for this line
134 $cmd_link = "ilias.php?baseClass=ilObjPluginDispatchGUI&amp;".
135 "cmd=forward&amp;ref_id=".$this->ref_id."&amp;forwardCmd=".$a_cmd;
136
137 return $cmd_link;
138 }
139
140 protected function initListActions() {
141 $this->delete_enabled = true;
142 $this->cut_enabled = true;
143 $this->subscribe_enabled = true;
144 $this->link_enabled = true;
145 $this->info_screen_enabled = true;
146 }
147}
148?>
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.
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 $lng
Definition: privfeed.php:17
$ilUser
Definition: imgupload.php:18