ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilPageObjectFactory.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2012 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
13 {
23  public static function getInstance($a_parent_type, $a_id = 0, $a_old_nr = 0, $a_lang = "-")
24  {
25  include_once("./Services/COPage/classes/class.ilCOPageObjDef.php");
27  $class = $def["class_name"];
28  $path = "./" . $def["component"] . "/" . $def["directory"] . "/class." . $class . ".php";
29  include_once($path);
30  $obj = new $class($a_id, $a_old_nr, $a_lang);
31 
32  return $obj;
33  }
34 
41  public static function getConfigInstance($a_parent_type)
42  {
43  include_once("./Services/COPage/classes/class.ilCOPageObjDef.php");
45  $class = $def["class_name"] . "Config";
46  $path = "./" . $def["component"] . "/" . $def["directory"] . "/class." . $class . ".php";
47  include_once($path);
48  $cfg = new $class();
49 
50  return $cfg;
51  }
52 
62  /* static function getGUIInstance($a_parent_type, $a_id = 0, $a_old_nr = 0, $a_lang = "-")
63  {
64  include_once("./Services/COPage/classes/class.ilCOPageObjDef.php");
65  $def = ilCOPageObjDef::getDefinitionByParentType($a_parent_type);
66  $class = $def["class_name"]."GUI";
67  $path = "./".$def["component"]."/".$def["directory"]."/class.".$class.".php";
68  include_once($path);
69  if (in_array($a_parent_type, array("cont", "cstr", "lm")))
70  {
71  $obj = new $class($a_id , $a_old_nr, $a_lang);
72  }
73  else if (in_array($a_parent_type, array("impr")))
74  {
75  $obj = new $class();
76  }
77  else if (in_array($a_parent_type, array("stys")))
78  {
79  $obj = new $class($a_parent_type, $a_id, $a_old_nr);
80  }
81  else if (in_array($a_parent_type, array("blog")))
82  {
83  $obj = new $class($a_parent_type, $a_id, $a_old_nr);
84  }
85  else
86  {
87  $obj = new $class($a_id , $a_old_nr);
88  }
89 
90  return $obj;
91  }*/
92 }
static getDefinitionByParentType($a_parent_type)
Get definition by parent type.
static getConfigInstance($a_parent_type)
Get page config instance.
catch(Exception $e) if(isset($_POST['cancel'])) if(isset($_POST['continue'])) $cfg
static getInstance($a_parent_type, $a_id=0, $a_old_nr=0, $a_lang="-")
Get page object instance.
$def
Definition: croninfo.php:21