ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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
6include_once "Services/Object/classes/class.ilObjectListGUI.php";
7
17{
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?>
static _getFrame($a_class, $a_type='')
Get content frame name.
_getCommands()
get commands
_lookupOnline($a_id)
Check wether wiki cast is online.
ListGUI class for wiki objects.
getCommandLink($a_cmd)
Get command link url.
getCommandFrame($a_cmd)
Get command target frame.
getProperties()
Get item properties.
initItem($a_ref_id, $a_obj_id, $a_title="", $a_description="")
inititialize new item
Class ilObjectListGUI.
ilObjectListGUI()
constructor
global $lng
Definition: privfeed.php:40
global $ilUser
Definition: imgupload.php:15