ILIAS  release_4-4 Revision
class.ilObjCategoryListGUI.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 include_once "Services/Object/classes/class.ilObjectListGUI.php";
25 
35 {
41  {
42  $this->ilObjectListGUI();
43  }
44 
48  function init()
49  {
50  $this->static_link_enabled = true;
51  $this->delete_enabled = true;
52  $this->cut_enabled = true;
53  $this->copy_enabled = true;
54  $this->subscribe_enabled = true;
55  $this->link_enabled = false;
56  $this->payment_enabled = false;
57 
58  $this->info_screen_enabled = true;
59 
60  $this->type = "cat";
61  $this->gui_class_name = "ilobjcategorygui";
62 
63  include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDSubstitution.php');
64  $this->substitutions = ilAdvancedMDSubstitution::_getInstanceByObjectType($this->type);
65  if($this->substitutions->isActive())
66  {
67  $this->substitutions_enabled = true;
68  }
69 
70  // general commands array
71  include_once('./Modules/Category/classes/class.ilObjCategoryAccess.php');
72  $this->commands = ilObjCategoryAccess::_getCommands();
73  }
74 
81  {
82  include_once("./Services/Container/classes/class.ilContainer.php");
83  include_once("./Services/Object/classes/class.ilObjectServiceSettingsGUI.php");
85  $this->obj_id,
87  true
88  ))
89  {
91  }
92 
93  return false;
94  }
95 
105  function getCommandFrame($a_cmd)
106  {
107  // begin-patch fm
108  return parent::getCommandFrame($a_cmd);
109  // end-patch fm
110  }
118  function getCommandLink($a_cmd)
119  {
120  global $ilCtrl;
121 
122  // BEGIN WebDAV
123  switch ($a_cmd)
124  {
125  case 'mount_webfolder' :
126  require_once ('Services/WebDAV/classes/class.ilDAVActivationChecker.php');
128  {
129  require_once ('Services/WebDAV/classes/class.ilDAVServer.php');
130  $davServer = ilDAVServer::getInstance();
131 
132  // FIXME: The following is a very dirty, ugly trick.
133  // To mount URI needs to be put into two attributes:
134  // href and folder. This hack returns both attributes
135  // like this: http://...mount_uri..." folder="http://...folder_uri...
136  $cmd_link = $davServer->getMountURI($this->ref_id).
137  '" folder="'.$davServer->getFolderURI($this->ref_id);
138  }
139  break;
140  default :
141  // separate method for this line
142  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $this->ref_id);
143  $cmd_link = $ilCtrl->getLinkTargetByClass("ilrepositorygui", $a_cmd);
144  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $_GET["ref_id"]);
145  break;
146  }
147  // END WebDAV
148 
149  return $cmd_link;
150  }
151 
152 } // END class.ilObjCategoryGUI
153 ?>
Class ilObjCategoryListGUI.
ilObjectListGUI()
constructor
$_GET["client_id"]
static _isActive()
Static getter.
static _getInstanceByObjectType($a_type)
Singleton: use this method to get an instance.
global $ilCtrl
Definition: ilias.php:18
Class ilObjectListGUI.
static getInstance()
Get singelton iunstance.
getCommandLink($a_cmd)
Get command link url.
_lookupContainerSetting($a_id, $a_keyword, $a_default_value=NULL)
Lookup a container setting.
getCommandFrame($a_cmd)
Get command target frame.