ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 function __construct()
21 {
22 }
23
24 function executeCommand()
25 {
26 global $ilCtrl;
27
28 $next_class = $ilCtrl->getNextClass();
29 $cmd_class = $ilCtrl->getCmdClass();
30
31 if ($cmd_class != "ilobjplugindispatchgui" && $cmd_class != "")
32 {
33 $class_path = $ilCtrl->lookupClassPath($next_class);
34 include_once($class_path);
35 $class_name = $ilCtrl->getClassForClasspath($class_path);
36//echo "-".$class_name."-".$class_path."-";
37 $this->gui_obj = new $class_name($_GET["ref_id"]);
38 $ilCtrl->forwardCommand($this->gui_obj);
39 }
40 else
41 {
42 $this->processCommand($ilCtrl->getCmd());
43 }
44 }
45
49 function processCommand($a_cmd)
50 {
51 switch ($a_cmd)
52 {
53 case "forward":
54 $this->forward();
55 break;
56 }
57 }
58
62 function forward()
63 {
64 global $ilCtrl;
65
66 $type = ilObject::_lookupType($_GET["ref_id"], true);
67 if ($type != "")
68 {
69 include_once("./Services/Component/classes/class.ilPlugin.php");
71 if ($plugin)
72 {
73 $gui_cn = "ilObj".$plugin->getPluginName()."GUI";
74 $ilCtrl->setParameterByClass($gui_cn, "ref_id", $_GET["ref_id"]);
75 $ilCtrl->redirectByClass($gui_cn, $_GET["forwardCmd"]);
76 }
77 }
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 getRepoPluginObjectByType($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