ILIAS  release_8 Revision v8.24
ilLTIRouterGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilLTIRouterGUI:
+ Collaboration diagram for ilLTIRouterGUI:

Public Member Functions

 __construct ()
 
 executeCommand ()
 The only thing this execute Command does is forward the command in the command chain. More...
 

Protected Attributes

ilCtrl $ilCtrl
 
ilGlobalTemplateInterface $main_tpl
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Service ilViewRouterGUI This service is used by LTI. It allows any plugin to get called by a http request without dependencies to a certain module or service other than this.

Author
Stefan Schneider schne.nosp@m.ider.nosp@m.@hrz..nosp@m.uni-.nosp@m.marbu.nosp@m.rg.d.nosp@m.e
Version
$Id:

Definition at line 31 of file class.ilLTIRouterGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilLTIRouterGUI::__construct ( )

Definition at line 36 of file class.ilLTIRouterGUI.php.

37 {
38 global $DIC;
39 $this->ilCtrl = $DIC->ctrl();
40 $this->main_tpl = $DIC->ui()->mainTemplate();
41 }
Class ilCtrl provides processing control methods.
global $DIC
Definition: feed.php:28

References $DIC.

Member Function Documentation

◆ executeCommand()

ilLTIRouterGUI::executeCommand ( )

The only thing this execute Command does is forward the command in the command chain.

Definition at line 46 of file class.ilLTIRouterGUI.php.

46 : 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 }
lookupClassPath(string $a_class)
@inheritDoc
getNextClass($a_gui_class=null)
@inheritDoc
forwardCommand(object $a_gui_object)
@inheritDoc

References ilCtrl\forwardCommand(), ilCtrl\getNextClass(), and ilCtrl\lookupClassPath().

+ Here is the call graph for this function:

Field Documentation

◆ $ilCtrl

ilCtrl ilLTIRouterGUI::$ilCtrl
protected

Definition at line 33 of file class.ilLTIRouterGUI.php.

◆ $main_tpl

ilGlobalTemplateInterface ilLTIRouterGUI::$main_tpl
protected

Definition at line 34 of file class.ilLTIRouterGUI.php.


The documentation for this class was generated from the following file: