ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilLTIRouterGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
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
47 public function executeCommand(): void
48 {
49 $next_class = $this->ilCtrl->getNextClass($this);
50 $class_file = '../' . ltrim($this->ilCtrl->lookupClassPath($next_class), './');
51
52 if (is_file($class_file)) {
53 //ToDo: check - was $gui = $next_class::getInstance(); // Singleton!
54 $gui = $next_class::getInstance();
55 // $gui = call_user_func([$next_class, 'getInstance']);
56 $this->ilCtrl->forwardCommand($gui);
57 } else {
58 $this->main_tpl->setOnScreenMessage('failure', 'GUI-Class not found! (' . $next_class . ')');
59 }
60 }
61}
Class ilCtrl provides processing control methods.
lookupClassPath(string $a_class)
@inheritDoc
getNextClass($a_gui_class=null)
@inheritDoc
forwardCommand(object $a_gui_object)
@inheritDoc
Service ilViewRouterGUI This service is used by LTI.
executeCommand()
The only thing this execute Command does is forward the command in the command chain.
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