ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
◀ ilDoc Overview
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
12
class
ilPageObjectFactory
13
{
23
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"
);
26
$def =
ilCOPageObjDef::getDefinitionByParentType
($a_parent_type);
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
static
function
getConfigInstance
($a_parent_type)
42
{
43
include_once(
"./Services/COPage/classes/class.ilCOPageObjDef.php"
);
44
$def =
ilCOPageObjDef::getDefinitionByParentType
($a_parent_type);
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
93
94
}
95
96
?>
ilCOPageObjDef\getDefinitionByParentType
static getDefinitionByParentType($a_parent_type)
Get definition by parent type.
Definition:
class.ilCOPageObjDef.php:54
$path
$path
Definition:
aliased.php:25
ilPageObjectFactory\getConfigInstance
static getConfigInstance($a_parent_type)
Get page config instance.
Definition:
class.ilPageObjectFactory.php:41
ilPageObjectFactory\getInstance
static getInstance($a_parent_type, $a_id=0, $a_old_nr=0, $a_lang="-")
Get page object instance.
Definition:
class.ilPageObjectFactory.php:23
ilPageObjectFactory
Page object factory.
Definition:
class.ilPageObjectFactory.php:12
php
Services
COPage
classes
class.ilPageObjectFactory.php
Generated on Fri Jan 24 2025 19:01:07 for ILIAS by
1.8.13 (using
Doxyfile
)