ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilObjFolderListGUI.php
Go to the documentation of this file.
1<?php
2/*
3 +-----------------------------------------------------------------------------+
4 | ILIAS open source |
5 +-----------------------------------------------------------------------------+
6 | Copyright (c) 1998-2001 ILIAS open source, University of Cologne |
7 | |
8 | This program is free software; you can redistribute it and/or |
9 | modify it under the terms of the GNU General Public License |
10 | as published by the Free Software Foundation; either version 2 |
11 | of the License, or (at your option) any later version. |
12 | |
13 | This program is distributed in the hope that it will be useful, |
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | GNU General Public License for more details. |
17 | |
18 | You should have received a copy of the GNU General Public License |
19 | along with this program; if not, write to the Free Software |
20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21 +-----------------------------------------------------------------------------+
22*/
23
24
35include_once "Services/Object/classes/class.ilObjectListGUI.php";
36
38{
42 public function init()
43 {
44 $this->static_link_enabled = true;
45 $this->delete_enabled = true;
46 $this->cut_enabled = true;
47 $this->copy_enabled = true;
48 $this->subscribe_enabled = true;
49 $this->link_enabled = false;
50 $this->info_screen_enabled = true;
51 $this->type = "fold";
52 $this->gui_class_name = "ilobjfoldergui";
53
54 // general commands array
55 include_once('./Modules/Folder/classes/class.ilObjFolderAccess.php');
56 $this->commands = ilObjFolderAccess::_getCommands();
57 }
58
67 public function getProperties()
68 {
69 $props = parent::getProperties();
70
71 return $props;
72 }
73
81 public function getCommandLink($a_cmd)
82 {
84
85 // BEGIN WebDAV: Mount webfolder.
86 switch ($a_cmd) {
87 case 'mount_webfolder':
88 require_once('Services/WebDAV/classes/class.ilDAVActivationChecker.php');
90 require_once('Services/WebDAV/classes/class.ilDAVServer.php');
91 $davServer = ilDAVServer::getInstance();
92
93 // XXX: The following is a very dirty, ugly trick.
94 // To mount URI needs to be put into two attributes:
95 // href and folder. This hack returns both attributes
96 // like this: http://...mount_uri..." folder="http://...folder_uri...
97 $cmd_link = $davServer->getMountURI($this->ref_id, $this->title, $this->parent) .
98 '" folder="' . $davServer->getFolderURI($this->ref_id, $this->title, $this->parent);
99 break;
100 } // Fall through, when plugin is inactive.
101 // no break
102 default:
103 // separate method for this line
104 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $this->ref_id);
105 $cmd_link = $ilCtrl->getLinkTargetByClass("ilrepositorygui", $a_cmd);
106 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $_GET["ref_id"]);
107 break;
108 }
109
110 return $cmd_link;
111 // END WebDAV: Mount Webfolder
112 }
113
114 // BEGIN WebDAV: mount_webfolder in _blank frame
124 public function getCommandFrame($a_cmd)
125 {
126 // begin-patch fm
127 return parent::getCommandFrame($a_cmd);
128 // end-patch fm
129 }
130 // END WebDAV: mount_webfolder in _blank frame
131} // END class.ilObjFolderListGUI
$_GET["client_id"]
An exception for terminatinating execution or to throw for unit testing.
static getInstance()
Get singelton instance.
static _getCommands()
get commands
Class ilObjFolderListGUI.
getCommandFrame($a_cmd)
Get command target frame.
getProperties()
Get item properties.
getCommandLink($a_cmd)
Get command link url.
Class ilObjectListGUI.
global $ilCtrl
Definition: ilias.php:18