ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ 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
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"
);
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
public
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
}
ilCOPageObjDef\getDefinitionByParentType
static getDefinitionByParentType($a_parent_type)
Get definition by parent type.
Definition:
class.ilCOPageObjDef.php:54
$path
$path
Definition:
serviceValidate.php:27
ilPageObjectFactory\getConfigInstance
static getConfigInstance($a_parent_type)
Get page config instance.
Definition:
class.ilPageObjectFactory.php:41
$cfg
catch(Exception $e) if(isset($_POST['cancel'])) if(isset($_POST['continue'])) $cfg
Definition:
invalid_session.php:47
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
$def
$def
Definition:
croninfo.php:21
ilPageObjectFactory
Page object factory.
Definition:
class.ilPageObjectFactory.php:12
Services
COPage
classes
class.ilPageObjectFactory.php
Generated on Sat Jan 18 2025 19:01:29 for ILIAS by
1.8.13 (using
Doxyfile
)