19declare(strict_types=1);
65 private const array
COMMANDS = [
'forward',
'jump',
'jumpToPluginSlot',
'showTree'];
89 $this->
help = $DIC[
"ilHelp"];
90 $this->
logger = $DIC->logger()->root();
91 $this->
lng = $DIC->language();
92 $this->tpl =
$DIC->ui()->mainTemplate();
93 $this->tree =
$DIC->repositoryTree();
94 $this->
access = $DIC->access();
95 $this->
user = $DIC->user();
96 $this->rbac_review =
$DIC->rbac()->review();
97 $this->obj_definition =
$DIC[
"objDefinition"];
98 $this->
ctrl = $DIC->ctrl();
99 $this->global_screen =
$DIC->globalScreen();
101 $this->
lng->loadLanguageModule(
'benchmark');
103 $context = $this->global_screen->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();
122 if ($this->tree->isInTree(
$ref_id)) {
128 $this->requested_obj_id = $this->request->getObjId();
143 $has_access = $this->
access->checkAccess(
'read',
'', $this->cur_ref_id);
149 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'permission_denied'),
true);
150 $this->
ctrl->redirectToURL(
158 $new_type = $this->request->getNewType();
160 $creation_mode =
true;
161 $obj_type = $new_type;
162 $class_name = $this->obj_definition->getClassName($obj_type);
163 $next_class = strtolower(
"ilObj" . $class_name .
"GUI");
165 $creation_mode =
false;
170 if ($this->
ctrl->getCmdClass() ===
"ilobjlanguageextgui") {
171 $next_class =
"ilobjlanguageextgui";
173 $next_class = $this->
ctrl->getNextClass($this);
177 $next_class ===
"iladministrationgui" || $next_class ==
""
178 ) && ($this->
ctrl->getCmd() ===
"return")) {
181 $class_name = $this->obj_definition->getClassName($obj_type);
182 $next_class = strtolower(
"ilObj" . $class_name .
"GUI");
186 if ($next_class !=
"" && $next_class !==
"iladministrationgui") {
187 $class_path = $this->
ctrl->lookupClassPath($next_class);
188 if (is_file($class_path)) {
189 require_once $class_path;
192 $class_name = $this->
ctrl->getClassForClasspath($class_path);
193 if (($next_class ===
"ilobjrolegui" || $next_class ===
"ilobjusergui"
194 || $next_class ===
"ilobjroletemplategui")) {
195 if ($this->requested_obj_id > 0) {
196 $this->gui_obj =
new $class_name(
null, $this->requested_obj_id,
false,
false);
197 $this->gui_obj->setCreationMode(
false);
199 $this->gui_obj =
new $class_name(
null, $this->cur_ref_id,
true,
false);
200 $this->gui_obj->setCreationMode(
true);
204 $this->gui_obj =
new $class_name($this->cur_ref_id);
205 } elseif (!$creation_mode) {
206 if (is_subclass_of($class_name,
"ilObject2GUI")) {
209 $this->gui_obj =
new $class_name(
null, $this->cur_ref_id,
true,
false);
212 if (is_subclass_of($class_name,
"ilObject2GUI")) {
215 $this->gui_obj =
new $class_name(
"", 0,
true,
false);
218 $this->gui_obj->setCreationMode($creation_mode);
220 $this->gui_obj->setAdminMode($this->admin_mode);
224 $this->
ctrl->setReturn($this,
"return");
225 $ret = $this->
ctrl->forwardCommand($this->gui_obj);
226 $html = $this->gui_obj->getHTML();
229 $this->tpl->setVariable(
"OBJECTS", $html);
231 $this->tpl->printToStdout();
235 $cmd = $this->
ctrl->getCmd(
"forward");
236 if (in_array($cmd, self::COMMANDS)) {
252 if ($this->admin_mode !==
"repository") {
255 $this->
ctrl->setParameterByClass(
"iladministrationgui",
"admin_mode",
"settings");
257 $this->
ctrl->setParameterByClass(
258 "ilobjuserfoldergui",
260 $this->request->getJumpToUserId()
262 $this->
ctrl->redirectByClass(
"ilobjuserfoldergui",
"jumpToUser");
264 $this->
ctrl->redirectByClass(
"ilobjuserfoldergui",
"view");
272 $this->
ctrl->setParameterByClass(
"iladministrationgui",
"admin_mode",
"repository");
273 $this->
ctrl->redirectByClass(
"ilobjrootfoldergui",
"view");
283 if ($this->admin_mode !==
"repository") {
290 $exp->handleCommand();
299 $this->
ctrl->redirectByClass(
"ilobjcomponentsettingsgui",
"listPlugins");
308 $ref_id = $this->request->getRefId();
311 $class_name = $this->obj_definition->getClassName($obj_type);
312 $class = strtolower(
"ilObj" . $class_name .
"GUI");
313 $this->
ctrl->setParameterByClass($class,
"ref_id",
$ref_id);
314 $this->
ctrl->redirectByClass($class,
"view");
Administration explorer GUI class.
Class ilAdministrationGUI.
readonly ilGlobalTemplateInterface $tpl
jumpToPluginSlot()
Special jump to plugin slot after ilCtrl has been reloaded Ths command is used by ilObjComponentSetti...
forward()
Redirect in special cases.
readonly ilAccessHandler $access
readonly ilLogger $logger
readonly ilRbacReview $rbac_review
readonly ilObjectDefinition $obj_definition
jump()
Jump to the GUI of an administration node This command is used by AdministrationMainBarProvider for t...
showTree()
Show the repository tree in the slate This command is used by ilAdministrationExplorerGUI the for adm...
readonly GlobalScreen $global_screen
readonly AdminGUIRequest $request
Class ilCtrl provides processing control methods.
Component logger with individual log levels by component id.
parses the objects.xml it handles the xml-description of all ilias objects
Class ilObjectGUI Basic methods of all Output classes.
const ADMIN_MODE_SETTINGS
const ADMIN_MODE_REPOSITORY
static _lookupType(int $id, bool $reference=false)
static _lookupObjId(int $ref_id)
class ilRbacReview Contains Review functions of core Rbac.
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
static getStartingPointAsUrl()
Interface ilAccessHandler This interface combines all available interfaces which can be called via gl...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...