ILIAS  release_8 Revision v8.24
class.ilLTIRouterGUI.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
32{
33 protected ilCtrl $ilCtrl;
35
36 public function __construct()
37 {
38 global $DIC;
39 $this->ilCtrl = $DIC->ctrl();
40 $this->main_tpl = $DIC->ui()->mainTemplate();
41 }
42
46 public function executeCommand(): void
47 {
48 $next_class = $this->ilCtrl->getNextClass($this);
49 $class_file = $this->ilCtrl->lookupClassPath($next_class);
50
51 if (is_file($class_file)) {
52 //ToDo: check - was $gui = $next_class::getInstance(); // Singleton!
53 $gui = $next_class::getInstance();
54// $gui = call_user_func([$next_class, 'getInstance']);
55 $this->ilCtrl->forwardCommand($gui);
56 } else {
57 $this->main_tpl->setOnScreenMessage('failure', 'GUI-Class not found! (' . $next_class . ')');
58 }
59 }
60}
Class ilCtrl provides processing control methods.
lookupClassPath(string $a_class)
@inheritDoc
getNextClass($a_gui_class=null)
@inheritDoc
forwardCommand(object $a_gui_object)
@inheritDoc
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
executeCommand()
The only thing this execute Command does is forward the command in the command chain.
ilGlobalTemplateInterface $main_tpl
global $DIC
Definition: feed.php:28
Interface ilCtrlBaseClassInterface describes ilCtrl base classes.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...