ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 {
41  protected $rbacadmin;
42 
46  protected $rbacsystem;
47 
52  public function __construct($a_data, $a_id, $a_call_by_reference)
53  {
54  global $DIC;
55 
56  $this->rbacadmin = $DIC->rbac()->admin();
57  $this->rbacsystem = $DIC->rbac()->system();
58  $this->type = "recf";
59  parent::__construct($a_data, $a_id, $a_call_by_reference, false);
60  }
61 
66  public function saveObject()
67  {
69 
70  // create and insert forum in objecttree
71  $newObj = parent::saveObject();
72 
73  // put here object specific stuff
74 
75  // always send a message
76  ilUtil::sendSuccess($this->lng->txt("object_added"), true);
77  exit();
78  }
79 
80  public function removeFromSystemObject()
81  {
83 
84  include_once("./Services/Repository/classes/class.ilRepUtilGUI.php");
85  $ru = new ilRepUtilGUI($this);
86  $ru->removeObjectsFromSystem($_POST["id"], true);
87  $this->ctrl->redirect($this, "view");
88  }
89 
90  public function executeCommand()
91  {
92  $next_class = $this->ctrl->getNextClass($this);
93  $cmd = $this->ctrl->getCmd();
94  $this->prepareOutput();
95 
96  switch ($next_class) {
97  case 'ilpermissiongui':
98  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
99  $perm_gui = new ilPermissionGUI($this);
100  $ret = &$this->ctrl->forwardCommand($perm_gui);
101  break;
102 
103  default:
104  if (!$cmd) {
105  $cmd = "view";
106  }
107  $cmd .= "Object";
108  $this->$cmd();
109 
110  break;
111  }
112  return true;
113  }
114 
115 
116  public function showPossibleSubObjects()
117  {
118  $this->sub_objects = "";
119  }
120 
124  public function getActions()
125  {
126  // standard actions for container
127  return array(
128  "cut" => array("name" => "cut", "lng" => "cut"),
129  "clear" => array("name" => "clear", "lng" => "clear"),
130  "removeFromSystem" => array("name" => "removeFromSystem", "lng" => "btn_remove_system")
131  );
132  }
133 } // END class.ilObjRecoveryFolderGUI
global $DIC
Definition: saml.php:7
Class ilObjRecoveryFolderGUI.
prepareOutput($a_show_subobjects=true)
prepare output
__construct($a_data, $a_id, $a_call_by_reference)
Constructor public.
Repository GUI Utilities.
exit
Definition: backend.php:16
$ret
Definition: parser.php:6
Class ilContainerGUI.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
$_POST["username"]