ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilObjRecoveryFolderGUI.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 require_once "./Services/Container/classes/class.ilContainerGUI.php";
25 
37 {
42  function ilObjRecoveryFolderGUI($a_data,$a_id,$a_call_by_reference)
43  {
44  $this->type = "recf";
45  $this->ilObjectGUI($a_data,$a_id,$a_call_by_reference,false);
46  }
47 
52  function saveObject()
53  {
54  global $rbacadmin;
55 
56  // create and insert forum in objecttree
57  $newObj = parent::saveObject();
58 
59  // setup rolefolder & default local roles
60  //$roles = $newObj->initDefaultRoles();
61 
62  // ...finally assign role to creator of object
63  //$rbacadmin->assignUser($roles[0], $newObj->getOwner(), "y");
64 
65  // put here object specific stuff
66 
67  // always send a message
68  ilUtil::sendSuccess($this->lng->txt("object_added"),true);
69  exit();
70  }
71 
73  {
74  global $rbacsystem;
75 
76  include_once("./Services/Repository/classes/class.ilRepUtilGUI.php");
77  $ru = new ilRepUtilGUI($this);
78  $ru->removeObjectsFromSystem($_POST["id"], true);
79  $this->ctrl->redirect($this, "view");
80  }
81 
82  function &executeCommand()
83  {
84  $next_class = $this->ctrl->getNextClass($this);
85  $cmd = $this->ctrl->getCmd();
86  $this->prepareOutput();
87 
88  switch($next_class)
89  {
90  case 'ilpermissiongui':
91  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
92  $perm_gui =& new ilPermissionGUI($this);
93  $ret =& $this->ctrl->forwardCommand($perm_gui);
94  break;
95 
96  default:
97  if(!$cmd)
98  {
99  $cmd = "view";
100  }
101  $cmd .= "Object";
102  $this->$cmd();
103 
104  break;
105  }
106  return true;
107  }
108 
109 
111  {
112  $this->sub_objects = "";
113  }
114 
118  function getActions()
119  {
120  // standard actions for container
121  return array(
122  "cut" => array("name" => "cut", "lng" => "cut"),
123  "clear" => array("name" => "clear", "lng" => "clear"),
124  "removeFromSystem" => array("name" => "removeFromSystem", "lng" => "btn_remove_system")
125  );
126  }
127 
128 } // END class.ilObjRecoveryFolderGUI
129 ?>