ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilObjPluginDispatchGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4include_once("./Services/Object/classes/class.ilObject2GUI.php");
5require_once('./Services/Repository/classes/class.ilObjectPlugin.php');
6
7/*
8* Dispatcher to all repository object plugins
9*
10* @author Alex Killing <alex.killing@gmx.de>
11* @version $Id$
12* @ilCtrl_Calls ilObjPluginDispatchGUI:
13* @ingroup ServicesRepository
14*/
16{
20 protected $ctrl;
21
25 public function __construct()
26 {
27 global $DIC;
28
29 $this->ctrl = $DIC->ctrl();
30 }
31
32 public function executeCommand()
33 {
35
36 $next_class = $ilCtrl->getNextClass();
37 $cmd_class = $ilCtrl->getCmdClass();
38
39 if ($cmd_class != "ilobjplugindispatchgui" && $cmd_class != "") {
40 $class_path = $ilCtrl->lookupClassPath($next_class);
41 include_once($class_path);
42 $class_name = $ilCtrl->getClassForClasspath($class_path);
43 //echo "-".$class_name."-".$class_path."-";
44 $this->gui_obj = new $class_name($_GET["ref_id"]);
45 $ilCtrl->forwardCommand($this->gui_obj);
46 } else {
47 $this->processCommand($ilCtrl->getCmd());
48 }
49 }
50
54 public function processCommand($a_cmd)
55 {
56 switch ($a_cmd) {
57 case "forward":
58 $this->forward();
59 break;
60 }
61 }
62
66 public function forward()
67 {
69
70 $type = ilObject::_lookupType($_GET["ref_id"], true);
71 if ($type != "") {
72 include_once("./Services/Component/classes/class.ilPlugin.php");
74 if ($plugin) {
75 $gui_cn = "ilObj" . $plugin->getPluginName() . "GUI";
76 $ilCtrl->setParameterByClass($gui_cn, "ref_id", $_GET["ref_id"]);
77 $ilCtrl->redirectByClass($gui_cn, $_GET["forwardCmd"]);
78 }
79 }
80 }
81}
$_GET["client_id"]
An exception for terminatinating execution or to throw for unit testing.
processCommand($a_cmd)
Process command.
forward()
Forward command to plugin.
static getPluginObjectByType($type)
Return either a repoObject plugin or a orgunit extension plugin or null if the type is not a plugin.
static _lookupType($a_id, $a_reference=false)
lookup object type
global $ilCtrl
Definition: ilias.php:18
$type
global $DIC
Definition: saml.php:7