ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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:22

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  }

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: