3 declare(strict_types=1);
84 $this->
help = $DIC[
"ilHelp"];
85 $this->db = $DIC->database();
86 $lng = $DIC->language();
87 $tpl = $DIC->ui()->mainTemplate();
88 $tree = $DIC->repositoryTree();
89 $rbacsystem = $DIC->rbac()->system();
90 $objDefinition = $DIC[
"objDefinition"];
91 $ilCtrl = $DIC->ctrl();
94 $this->
lng->loadLanguageModule(
'administration');
99 $this->
ctrl = $ilCtrl;
101 $context = $DIC->globalScreen()->tool()->context();
102 $context->claim()->administration();
109 $this->
ctrl->saveParameter($this, array(
"ref_id",
"admin_mode"));
111 $this->admin_mode = $this->request->getAdminMode();
116 $this->
ctrl->setReturn($this,
"");
119 $ref_id = $this->request->getRefId();
126 $this->requested_obj_id = $this->request->getObjId();
149 $new_type = $this->request->getNewType();
151 $this->creation_mode =
true;
154 if ($this->creation_mode) {
155 $obj_type = $new_type;
156 $class_name = $this->objDefinition->getClassName($obj_type);
157 $next_class = strtolower(
"ilObj" . $class_name .
"GUI");
158 $this->
ctrl->setCmdClass($next_class);
163 if ($this->
ctrl->getCmdClass() ===
"ilobjlanguageextgui") {
164 $next_class =
"ilobjlanguageextgui";
166 $next_class = $this->
ctrl->getNextClass($this);
170 $next_class ===
"iladministrationgui" || $next_class ==
"" 171 ) && ($this->
ctrl->getCmd() ===
"return")) {
174 $class_name = $this->objDefinition->getClassName($obj_type);
175 $next_class = strtolower(
"ilObj" . $class_name .
"GUI");
176 $this->
ctrl->setCmdClass($next_class);
177 $this->
ctrl->setCmd(
"view");
180 $cmd = $this->
ctrl->getCmd(
"forward");
183 switch ($next_class) {
187 if ($next_class !=
"" && $next_class !==
"iladministrationgui") {
190 if (!$dbupdate->getDBVersionStatus()) {
191 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"db_need_update"));
192 } elseif ($dbupdate->hotfixAvailable()) {
193 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"db_need_hotfix"));
196 $class_path = $this->
ctrl->lookupClassPath($next_class);
197 if (is_file($class_path)) {
198 require_once $class_path;
201 $class_name = $this->
ctrl->getClassForClasspath($class_path);
202 if (($next_class ===
"ilobjrolegui" || $next_class ===
"ilobjusergui" 203 || $next_class ===
"ilobjroletemplategui")) {
204 if ($this->requested_obj_id > 0) {
205 $this->gui_obj =
new $class_name(null, $this->requested_obj_id,
false,
false);
206 $this->gui_obj->setCreationMode(
false);
208 $this->gui_obj =
new $class_name(null, $this->cur_ref_id,
true,
false);
209 $this->gui_obj->setCreationMode(
true);
213 $this->gui_obj =
new $class_name($this->cur_ref_id);
215 if (!$this->creation_mode) {
216 if (is_subclass_of($class_name,
"ilObject2GUI")) {
219 $this->gui_obj =
new $class_name(null, $this->cur_ref_id,
true,
false);
222 if (is_subclass_of($class_name,
"ilObject2GUI")) {
225 $this->gui_obj =
new $class_name(
"", 0,
true,
false);
229 $this->gui_obj->setCreationMode($this->creation_mode);
231 $this->gui_obj->setAdminMode($this->admin_mode);
236 $this->
ctrl->setReturn($this,
"return");
237 $ret = $this->
ctrl->forwardCommand($this->gui_obj);
238 $html = $this->gui_obj->getHTML();
241 $this->tpl->setVariable(
"OBJECTS", $html);
243 $this->tpl->printToStdout();
245 $cmd = $this->
ctrl->getCmd(
"forward");
259 if ($this->admin_mode !==
"repository") {
262 $this->
ctrl->setParameterByClass(
"iladministrationgui",
"admin_mode",
"settings");
264 $this->
ctrl->setParameterByClass(
265 "ilobjuserfoldergui",
267 $this->request->getJumpToUserId()
269 $this->
ctrl->redirectByClass(
"ilobjuserfoldergui",
"jumpToUser");
271 $this->
ctrl->redirectByClass(
"ilobjuserfoldergui",
"view");
303 $this->
ctrl->setParameterByClass(
"iladministrationgui",
"admin_mode",
"repository");
304 $this->
ctrl->redirectByClass(
"ilobjrootfoldergui",
"view");
312 if ($this->admin_mode !==
"repository") {
319 $exp->handleCommand();
335 $ref_id = $this->request->getRefId();
339 $class = strtolower(
"ilObj" . $class_name .
"GUI");
340 $ilCtrl->setParameterByClass($class,
"ref_id",
$ref_id);
341 $ilCtrl->redirectByClass($class,
"view");
Class ilAdministratioGUI.
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)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Administration explorer GUI class.
ilObjectDefinition $objDefinition
ilGlobalTemplateInterface $tpl
__construct(Container $dic, ilPlugin $plugin)
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)