19 declare(strict_types=1);
85 $this->
help = $DIC[
"ilHelp"];
86 $this->db = $DIC->database();
87 $lng = $DIC->language();
88 $tpl = $DIC->ui()->mainTemplate();
89 $tree = $DIC->repositoryTree();
90 $rbacsystem = $DIC->rbac()->system();
91 $objDefinition = $DIC[
"objDefinition"];
92 $ilCtrl = $DIC->ctrl();
93 $this->error = $DIC[
'ilErr'];
96 $this->
lng->loadLanguageModule(
'administration');
101 $this->
ctrl = $ilCtrl;
103 $context = $DIC->globalScreen()->tool()->context();
104 $context->claim()->administration();
111 $this->
ctrl->saveParameter($this, array(
"ref_id",
"admin_mode"));
113 $this->admin_mode = $this->request->getAdminMode();
118 $this->
ctrl->setReturn($this,
"");
121 $ref_id = $this->request->getRefId();
128 $this->requested_obj_id = $this->request->getObjId();
146 $this->error->raiseError($this->
lng->txt(
'permission_denied'), $this->error->MESSAGE);
151 $new_type = $this->request->getNewType();
153 $this->creation_mode =
true;
156 if ($this->creation_mode) {
157 $obj_type = $new_type;
158 $class_name = $this->objDefinition->getClassName($obj_type);
159 $next_class = strtolower(
"ilObj" . $class_name .
"GUI");
160 $this->
ctrl->setCmdClass($next_class);
165 if ($this->
ctrl->getCmdClass() ===
"ilobjlanguageextgui") {
166 $next_class =
"ilobjlanguageextgui";
168 $next_class = $this->
ctrl->getNextClass($this);
172 $next_class ===
"iladministrationgui" || $next_class ==
"" 173 ) && ($this->
ctrl->getCmd() ===
"return")) {
176 $class_name = $this->objDefinition->getClassName($obj_type);
177 $next_class = strtolower(
"ilObj" . $class_name .
"GUI");
178 $this->
ctrl->setCmdClass($next_class);
179 $this->
ctrl->setCmd(
"view");
182 $cmd = $this->
ctrl->getCmd(
"forward");
185 switch ($next_class) {
189 if ($next_class !=
"" && $next_class !==
"iladministrationgui") {
190 $class_path = $this->
ctrl->lookupClassPath($next_class);
191 if (is_file($class_path)) {
192 require_once $class_path;
195 $class_name = $this->
ctrl->getClassForClasspath($class_path);
196 if (($next_class ===
"ilobjrolegui" || $next_class ===
"ilobjusergui" 197 || $next_class ===
"ilobjroletemplategui")) {
198 if ($this->requested_obj_id > 0) {
199 $this->gui_obj =
new $class_name(null, $this->requested_obj_id,
false,
false);
200 $this->gui_obj->setCreationMode(
false);
202 $this->gui_obj =
new $class_name(null, $this->cur_ref_id,
true,
false);
203 $this->gui_obj->setCreationMode(
true);
207 $this->gui_obj =
new $class_name($this->cur_ref_id);
209 if (!$this->creation_mode) {
210 if (is_subclass_of($class_name,
"ilObject2GUI")) {
213 $this->gui_obj =
new $class_name(null, $this->cur_ref_id,
true,
false);
216 if (is_subclass_of($class_name,
"ilObject2GUI")) {
219 $this->gui_obj =
new $class_name(
"", 0,
true,
false);
223 $this->gui_obj->setCreationMode($this->creation_mode);
225 $this->gui_obj->setAdminMode($this->admin_mode);
230 $this->
ctrl->setReturn($this,
"return");
231 $ret = $this->
ctrl->forwardCommand($this->gui_obj);
232 $html = $this->gui_obj->getHTML();
235 $this->tpl->setVariable(
"OBJECTS", $html);
237 $this->tpl->printToStdout();
239 $cmd = $this->
ctrl->getCmd(
"forward");
253 if ($this->admin_mode !==
"repository") {
256 $this->
ctrl->setParameterByClass(
"iladministrationgui",
"admin_mode",
"settings");
258 $this->
ctrl->setParameterByClass(
259 "ilobjuserfoldergui",
261 $this->request->getJumpToUserId()
263 $this->
ctrl->redirectByClass(
"ilobjuserfoldergui",
"jumpToUser");
265 $this->
ctrl->redirectByClass(
"ilobjuserfoldergui",
"view");
296 $this->
ctrl->setParameterByClass(
"iladministrationgui",
"admin_mode",
"repository");
297 $this->
ctrl->redirectByClass(
"ilobjrootfoldergui",
"view");
305 if ($this->admin_mode !==
"repository") {
312 $exp->handleCommand();
328 $ref_id = $this->request->getRefId();
332 $class = strtolower(
"ilObj" . $class_name .
"GUI");
333 $ilCtrl->setParameterByClass($class,
"ref_id",
$ref_id);
334 $ilCtrl->redirectByClass($class,
"view");
Class ilAdministratioGUI.
readonly ilErrorHandling $error
const ADMIN_MODE_REPOSITORY
redirectByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
isInTree(?int $a_node_id)
get all information of a node.
static _lookupObjId(int $ref_id)
Interface ilCtrlBaseClassInterface describes ilCtrl base classes.
checkAccess(string $a_operations, int $a_ref_id, string $a_type="")
checkAccess represents the main method of the RBAC-system in ILIAS3 developers want to use With this ...
parses the objects.xml it handles the xml-description of all ilias objects
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
forward()
Forward to class/command.
const ADMIN_MODE_SETTINGS
Class ilObjectGUI Basic methods of all Output classes.
getClassName(string $obj_name)
Administration explorer GUI class.
ilObjectDefinition $objDefinition
ilGlobalTemplateInterface $tpl
Error Handling & global info handling.
isPlugin(string $obj_name)
get RBAC status by type returns true if object type is an (activated) plugin type ...
static _lookupType(int $id, bool $reference=false)