ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilObjWikiListGUI.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 
5 
6 include_once "Services/Object/classes/class.ilObjectListGUI.php";
7 
17 {
21  function ilObjWikiListGUI()
22  {
23  $this->ilObjectListGUI();
24  }
25 
29  function init()
30  {
31  $this->copy_enabled = true;
32  $this->delete_enabled = true;
33  $this->cut_enabled = true;
34  $this->subscribe_enabled = true;
35  $this->link_enabled = true;
36  $this->payment_enabled = false;
37  $this->info_screen_enabled = true;
38  $this->type = "wiki";
39  $this->gui_class_name = "ilobjwikigui";
40 
41  // general commands array
42  include_once('./Modules/Wiki/classes/class.ilObjWikiAccess.php');
43  $this->commands = ilObjWikiAccess::_getCommands();
44  }
45 
46 
55  function initItem($a_ref_id, $a_obj_id, $a_title = "", $a_description = "")
56  {
57  parent::initItem($a_ref_id, $a_obj_id, $a_title, $a_description);
58  }
59 
60 
68  function getCommandFrame($a_cmd)
69  {
70  switch($a_cmd)
71  {
72  default:
73  $frame = ilFrameTargetInfo::_getFrame("MainContent");
74  break;
75  }
76 
77  return $frame;
78  }
79 
80 
81 
90  function getProperties()
91  {
92  global $lng, $ilUser;
93 
94  $props = array();
95 
96  include_once("./Modules/Wiki/classes/class.ilObjWikiAccess.php");
97 
98  if (!ilObjWikiAccess::_lookupOnline($this->obj_id))
99  {
100  $props[] = array("alert" => true, "property" => $lng->txt("status"),
101  "value" => $lng->txt("offline"));
102  }
103 
104  return $props;
105  }
106 
107 
115  function getCommandLink($a_cmd)
116  {
117  switch($a_cmd)
118  {
119  case 'downloadFile':
120  $cmd_link = "ilias.php?baseClass=ilWikiHandlerGUI".
121  "&amp;cmdClass=ilwikipagegui&amp;ref_id=".$this->ref_id.
122  "&amp;cmd=downloadFile&amp;file_id=".$this->getChildId();
123  break;
124 
125  default:
126  // separate method for this line
127  $cmd_link = "ilias.php?baseClass=ilWikiHandlerGUI&ref_id=".$this->ref_id."&cmd=$a_cmd";
128  break;
129 
130  }
131 
132 
133  return $cmd_link;
134  }
135 
136  function setChildId($a_child_id)
137  {
138  $this->child_id = $a_child_id;
139  }
140  function getChildId()
141  {
142  return $this->child_id;
143  }
144 
145 
146 } // END class.ilObjWikiListGUI
147 ?>