ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
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 
4 include_once("./Services/Object/classes/class.ilObject2GUI.php");
5 
6 /*
7 * Dispatcher to all repository object plugins
8 *
9 * @author Alex Killing <alex.killing@gmx.de>
10 * @version $Id$
11 * @ilCtrl_Calls ilObjPluginDispatchGUI:
12 * @ingroup ServicesRepository
13 */
15 {
19  function __construct()
20  {
21  }
22 
23  function &executeCommand()
24  {
25  global $ilCtrl;
26 
27  $next_class = $ilCtrl->getNextClass();
28  $cmd_class = $ilCtrl->getCmdClass();
29 
30  if ($cmd_class != "ilobjplugindispatchgui" && $cmd_class != "")
31  {
32  $class_path = $ilCtrl->lookupClassPath($next_class);
33  include_once($class_path);
34  $class_name = $ilCtrl->getClassForClasspath($class_path);
35 //echo "-".$class_name."-".$class_path."-";
36  $this->gui_obj = new $class_name($_GET["ref_id"]);
37  $ilCtrl->forwardCommand($this->gui_obj);
38  }
39  else
40  {
41  $this->processCommand($ilCtrl->getCmd());
42  }
43  }
44 
48  function processCommand($a_cmd)
49  {
50  switch ($a_cmd)
51  {
52  case "forward":
53  $this->forward();
54  break;
55  }
56  }
57 
61  function forward()
62  {
63  global $ilCtrl;
64 
65  $type = ilObject::_lookupType($_GET["ref_id"], true);
66  if ($type != "")
67  {
68  include_once("./Services/Component/classes/class.ilPlugin.php");
69  $pl_name = ilPlugin::lookupNameForId(IL_COMP_SERVICE, "Repository", "robj", $type);
70  if ($pl_name != "")
71  {
72  $gui_cn = "ilObj".$pl_name."GUI";
73  $ilCtrl->setParameterByClass($gui_cn, "ref_id", $_GET["ref_id"]);
74  $ilCtrl->redirectByClass($gui_cn, $_GET["forwardCmd"]);
75  }
76  }
77  }
78 
79 
80 }