ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
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 = $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 }
Interface ilCtrlBaseClassInterface describes ilCtrl base classes.
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilGlobalTemplateInterface $main_tpl