ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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{
21 function __construct()
22 {
23 parent::__construct();
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->info_screen_enabled = true;
37 $this->type = "wiki";
38 $this->gui_class_name = "ilobjwikigui";
39
40 // general commands array
41 include_once('./Modules/Wiki/classes/class.ilObjWikiAccess.php');
42 $this->commands = ilObjWikiAccess::_getCommands();
43 }
44
45
54 function initItem($a_ref_id, $a_obj_id, $a_title = "", $a_description = "")
55 {
56 parent::initItem($a_ref_id, $a_obj_id, $a_title, $a_description);
57 }
58
59
67 function getCommandFrame($a_cmd)
68 {
69 switch($a_cmd)
70 {
71 default:
72 $frame = ilFrameTargetInfo::_getFrame("MainContent");
73 break;
74 }
75
76 return $frame;
77 }
78
79
80
89 function getProperties()
90 {
91 global $lng, $ilUser;
92
93 $props = array();
94
95 include_once("./Modules/Wiki/classes/class.ilObjWikiAccess.php");
96
97 if (!ilObjWikiAccess::_lookupOnline($this->obj_id))
98 {
99 $props[] = array("alert" => true, "property" => $lng->txt("status"),
100 "value" => $lng->txt("offline"));
101 }
102
103 return $props;
104 }
105
106
114 function getCommandLink($a_cmd)
115 {
116 switch($a_cmd)
117 {
118 case 'downloadFile':
119 $cmd_link = "ilias.php?baseClass=ilWikiHandlerGUI".
120 "&amp;cmdClass=ilwikipagegui&amp;ref_id=".$this->ref_id.
121 "&amp;cmd=downloadFile&amp;file_id=".$this->getChildId();
122 break;
123
124 default:
125 // separate method for this line
126 $cmd_link = "ilias.php?baseClass=ilWikiHandlerGUI&ref_id=".$this->ref_id."&cmd=$a_cmd";
127 break;
128
129 }
130
131
132 return $cmd_link;
133 }
134
135 function setChildId($a_child_id)
136 {
137 $this->child_id = $a_child_id;
138 }
139 function getChildId()
140 {
141 return $this->child_id;
142 }
143
144
145} // END class.ilObjWikiListGUI
146?>
An exception for terminatinating execution or to throw for unit testing.
static _getFrame($a_class, $a_type='')
Get content frame name.
static _lookupOnline($a_id)
Check wether wiki cast is online.
static _getCommands()
get commands
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.
global $lng
Definition: privfeed.php:17
$ilUser
Definition: imgupload.php:18