ILIAS  release_7 Revision v7.30-3-g800a261c036
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
24require_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
$_POST["username"]
An exception for terminatinating execution or to throw for unit testing.
Class ilContainerGUI.
prepareOutput($a_show_subobjects=true)
prepare output
Class ilObjRecoveryFolderGUI.
showPossibleSubObjects()
show possible sub objects selection list
saveObject()
save object @access public
removeFromSystemObject()
remove objects from trash bin and all entries therefore every object needs a specific deleteObject() ...
__construct($a_data, $a_id, $a_call_by_reference)
Constructor @access public.
executeCommand()
execute command note: this method is overwritten in all container objects
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
Repository GUI Utilities.
global $DIC
Definition: goto.php:24
exit
Definition: login.php:29
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$ret
Definition: parser.php:6