ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilPageObjectFactory.php
Go to the documentation of this file.
1<?php
2
25{
29 public static function getInstance(
30 string $a_parent_type,
31 int $a_id = 0,
32 int $a_old_nr = 0,
33 string $a_lang = "-"
34 ): ilPageObject {
35 $def = ilCOPageObjDef::getDefinitionByParentType($a_parent_type);
36 $class = $def["class_name"];
37 $obj = new $class($a_id, $a_old_nr, $a_lang);
38
39 return $obj;
40 }
41
45 public static function getConfigInstance(
46 string $a_parent_type
47 ): ilPageConfig {
48 $def = ilCOPageObjDef::getDefinitionByParentType($a_parent_type);
49 $class = $def["class_name"] . "Config";
50 $path = "./" . $def["component"] . "/" . $def["directory"] . "/class." . $class . ".php";
51 $cfg = new $class();
52
53 return $cfg;
54 }
55
65 /* static function getGUIInstance($a_parent_type, $a_id = 0, $a_old_nr = 0, $a_lang = "-")
66 {
67 $def = ilCOPageObjDef::getDefinitionByParentType($a_parent_type);
68 $class = $def["class_name"]."GUI";
69 $path = "./".$def["component"]."/".$def["directory"]."/class.".$class.".php";
70 if (in_array($a_parent_type, array("cont", "cstr", "lm")))
71 {
72 $obj = new $class($a_id , $a_old_nr, $a_lang);
73 }
74 else if (in_array($a_parent_type, array("impr")))
75 {
76 $obj = new $class();
77 }
78 else if (in_array($a_parent_type, array("stys")))
79 {
80 $obj = new $class($a_parent_type, $a_id, $a_old_nr);
81 }
82 else if (in_array($a_parent_type, array("blog")))
83 {
84 $obj = new $class($a_parent_type, $a_id, $a_old_nr);
85 }
86 else
87 {
88 $obj = new $class($a_id , $a_old_nr);
89 }
90
91 return $obj;
92 }*/
93}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getInstance(string $a_parent_type, int $a_id=0, int $a_old_nr=0, string $a_lang="-")
Get page object instance.
static getConfigInstance(string $a_parent_type)
Get page config instance.
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
$path
Definition: ltiservices.php:30