ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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  public function init()
22  {
23  $this->copy_enabled = true;
24  $this->delete_enabled = true;
25  $this->cut_enabled = true;
26  $this->subscribe_enabled = true;
27  $this->link_enabled = true;
28  $this->info_screen_enabled = true;
29  $this->type = "wiki";
30  $this->gui_class_name = "ilobjwikigui";
31 
32  // general commands array
33  include_once('./Modules/Wiki/classes/class.ilObjWikiAccess.php');
34  $this->commands = ilObjWikiAccess::_getCommands();
35  }
36 
37 
46  public function initItem($a_ref_id, $a_obj_id, $a_title = "", $a_description = "")
47  {
48  parent::initItem($a_ref_id, $a_obj_id, $a_title, $a_description);
49  }
50 
51 
59  public function getCommandFrame($a_cmd)
60  {
61  switch ($a_cmd) {
62  default:
63  $frame = ilFrameTargetInfo::_getFrame("MainContent");
64  break;
65  }
66 
67  return $frame;
68  }
69 
70 
71 
80  public function getProperties()
81  {
82  $lng = $this->lng;
84 
85  $props = array();
86 
87  include_once("./Modules/Wiki/classes/class.ilObjWikiAccess.php");
88 
89  if (!ilObjWikiAccess::_lookupOnline($this->obj_id)) {
90  $props[] = array("alert" => true, "property" => $lng->txt("status"),
91  "value" => $lng->txt("offline"));
92  }
93 
94  return $props;
95  }
96 
97 
105  public function getCommandLink($a_cmd)
106  {
107  switch ($a_cmd) {
108  case 'downloadFile':
109  $cmd_link = "ilias.php?baseClass=ilWikiHandlerGUI" .
110  "&amp;cmdClass=ilwikipagegui&amp;ref_id=" . $this->ref_id .
111  "&amp;cmd=downloadFile&amp;file_id=" . $this->getChildId();
112  break;
113 
114  default:
115  // separate method for this line
116  $cmd_link = "ilias.php?baseClass=ilWikiHandlerGUI&ref_id=" . $this->ref_id . "&cmd=$a_cmd";
117  break;
118 
119  }
120 
121 
122  return $cmd_link;
123  }
124 
125  public function setChildId($a_child_id)
126  {
127  $this->child_id = $a_child_id;
128  }
129  public function getChildId()
130  {
131  return $this->child_id;
132  }
133 } // END class.ilObjWikiListGUI
getCommandLink($a_cmd)
Get command link url.
getProperties()
Get item properties.
static _getCommands()
get commands
Class ilObjectListGUI.
$ilUser
Definition: imgupload.php:18
ListGUI class for wiki objects.
Create styles array
The data for the language used.
initItem($a_ref_id, $a_obj_id, $a_title="", $a_description="")
inititialize new item
static _getFrame($a_class, $a_type='')
Get content frame name.
static _lookupOnline($a_id)
Check wether wiki cast is online.
getCommandFrame($a_cmd)
Get command target frame.