ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
ilLTIRouterGUI Class Reference

Service ilViewRouterGUI This service is used by LTI. 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

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.

References $DIC.

37  {
38  global $DIC;
39  $this->ilCtrl = $DIC->ctrl();
40  $this->main_tpl = $DIC->ui()->mainTemplate();
41  }
global $DIC
Definition: shib_login.php:25

Member Function Documentation

◆ executeCommand()

ilLTIRouterGUI::executeCommand ( )

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

Exceptions
ilCtrlException

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

47  : 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  }

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: