ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilUIPluginRouterGUI.php
Go to the documentation of this file.
1<?php
2
28{
29 protected ilCtrl $ctrl;
30 private \ilGlobalTemplateInterface $main_tpl;
31
32 public function __construct()
33 {
34 global $DIC;
35 $this->main_tpl = $DIC->ui()->mainTemplate();
36 $this->ctrl = $DIC->ctrl();
37 }
38
39 public function executeCommand(): void
40 {
41 $next_class = $this->ctrl->getNextClass($this);
42 switch ($next_class) {
43 default:
44 $class_file = '../' . ltrim($this->ctrl->lookupClassPath($next_class), './');
45 if (is_file($class_file)) {
46 include_once($class_file);
47 $gui = new $next_class();
48 $this->ctrl->forwardCommand($gui);
49 } else {
50 $this->main_tpl->setOnScreenMessage('failure', 'Plugin GUI-Class not found! (' . $next_class . ')');
51 }
52 break;
53 }
54 }
55}
Class ilCtrl provides processing control methods.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilGlobalTemplateInterface $main_tpl
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: shib_login.php:26