ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilObjPluginDispatchGUI Class Reference

Dispatcher to all repository object plugins. More...

+ Inheritance diagram for ilObjPluginDispatchGUI:
+ Collaboration diagram for ilObjPluginDispatchGUI:

Public Member Functions

 executeCommand ()
 
 processCommand (string $a_cmd)
 
 forward ()
 Forward command to plugin. More...
 

Protected Attributes

ilCtrl $ctrl
 
PluginSlotGUIRequest $request
 
object $gui_obj
 

Detailed Description

Dispatcher to all repository object plugins.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de @ilCtrl_Calls ilObjPluginDispatchGUI:

Definition at line 27 of file class.ilObjPluginDispatchGUI.php.

Member Function Documentation

◆ executeCommand()

ilObjPluginDispatchGUI::executeCommand ( )

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

47 : void
48 {
49 $ilCtrl = $this->ctrl;
50
51 $next_class = $ilCtrl->getNextClass();
52 $cmd_class = strtolower($ilCtrl->getCmdClass());
53 if ($cmd_class !== "ilobjplugindispatchgui" && $cmd_class !== "" && $cmd_class !== null) {
54 $class_path = $ilCtrl->lookupClassPath($next_class);
55 // note: $next_class is lower case, $class_name
56 // has the correct case so that new $class_name will work
57 // also note: if other places did a new $class_name already
58 // the lower case name will work here "by accident", too
59 $class_name = $ilCtrl->getClassForClasspath($class_path);
60 $this->gui_obj = new $class_name($this->request->getRefId());
61 $ilCtrl->forwardCommand($this->gui_obj);
62 } else {
63 $this->processCommand($ilCtrl->getCmd());
64 }
65 }
getNextClass($a_gui_class=null)
@inheritDoc

References $ctrl, ilCtrl\getNextClass(), and processCommand().

+ Here is the call graph for this function:

◆ forward()

ilObjPluginDispatchGUI::forward ( )

Forward command to plugin.

Definition at line 79 of file class.ilObjPluginDispatchGUI.php.

79 : void
80 {
81 $ilCtrl = $this->ctrl;
82
83 $type = ilObject::_lookupType($this->request->getRefId(), true);
84 if ($type !== "") {
86 if ($plugin) {
87 $gui_cn = "ilObj" . $plugin->getPluginName() . "GUI";
88 $ilCtrl->setParameterByClass($gui_cn, "ref_id", $this->request->getRefId());
89 $ilCtrl->redirectByClass($gui_cn, $this->request->getForwardCmd());
90 }
91 }
92 }
static getPluginObjectByType(string $type)
Return either a repoObject plugin or a orgunit extension plugin or null if the type is not a plugin.
static _lookupType(int $id, bool $reference=false)

References $ctrl, XapiProxy\$plugin, ilObject\_lookupType(), and ilObjectPlugin\getPluginObjectByType().

Referenced by processCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processCommand()

ilObjPluginDispatchGUI::processCommand ( string  $a_cmd)

Definition at line 67 of file class.ilObjPluginDispatchGUI.php.

67 : void
68 {
69 switch ($a_cmd) {
70 case "forward":
71 $this->forward();
72 break;
73 }
74 }
forward()
Forward command to plugin.

References forward().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $ctrl

ilCtrl ilObjPluginDispatchGUI::$ctrl
protected

Definition at line 29 of file class.ilObjPluginDispatchGUI.php.

Referenced by executeCommand(), and forward().

◆ $gui_obj

object ilObjPluginDispatchGUI::$gui_obj
protected

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

◆ $request

PluginSlotGUIRequest ilObjPluginDispatchGUI::$request
protected

Definition at line 30 of file class.ilObjPluginDispatchGUI.php.


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