ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
◀ ilDoc Overview
class.ilContainerExporter.php
Go to the documentation of this file.
1
<?
php
2
/* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4
5
include_once
'./Services/Container/classes/class.ilContainerXmlWriter.php'
;
6
include_once
'./Services/Export/classes/class.ilXmlExporter.php'
;
7
17
class
ilContainerExporter
extends
ilXmlExporter
18
{
19
private
$writer
= null;
20
24
public
function
__construct
()
25
{
26
27
}
28
33
public
function
init
()
34
{
35
}
36
37
public
function
getXmlExportTailDependencies
($a_entity, $a_target_release, $a_ids)
38
{
39
if
($a_entity !=
'struct'
)
40
{
41
return
;
42
}
43
44
45
$res
=
array
();
46
47
// pages
48
49
$pg_ids =
array
();
50
51
// container pages
52
include_once(
"./Services/Container/classes/class.ilContainerPage.php"
);
53
foreach
($a_ids as $id)
54
{
55
if
(
ilContainerPage::_exists
(
"cont"
, $id))
56
{
57
$pg_ids[] =
"cont:"
.$id;
58
}
59
}
60
61
// container start objects pages
62
include_once(
"./Services/Container/classes/class.ilContainerStartObjectsPage.php"
);
63
foreach
($a_ids as $id)
64
{
65
if
(
ilContainerStartObjectsPage::_exists
(
"cstr"
, $id))
66
{
67
$pg_ids[] =
"cstr:"
.$id;
68
}
69
}
70
71
if
(
sizeof
($pg_ids))
72
{
73
$res
[] =
array
(
74
"component"
=>
"Services/COPage"
,
75
"entity"
=>
"pg"
,
76
"ids"
=> $pg_ids
77
);
78
}
79
80
// style
81
$style_ids =
array
();
82
foreach
($a_ids as $id)
83
{
84
include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php"
);
85
$style_id =
ilObjStyleSheet::lookupObjectStyle
($id);
86
if
($style_id > 0)
87
{
88
$style_ids[] = $style_id;
89
}
90
}
91
if
(
sizeof
($style_ids))
92
{
93
$res
[] =
array
(
94
"component"
=>
"Services/Style"
,
95
"entity"
=>
"sty"
,
96
"ids"
=> $style_ids
97
);
98
}
99
100
return
$res
;
101
}
102
110
public
function
getXmlRepresentation
($a_entity, $a_schema_version, $a_id)
111
{
112
if
($a_entity ==
'struct'
)
113
{
114
$GLOBALS
[
'ilLog'
]->write(__METHOD__.
': Received id = '
.$a_id);
115
$writer
=
new
ilContainerXmlWriter
(end(
ilObject::_getAllReferences
($a_id)));
116
$writer
->write();
117
return
$writer
->xmlDumpMem(
false
);
118
}
119
}
120
128
public
function
getValidSchemaVersions
($a_entity)
129
{
130
return
array
(
131
"4.1.0"
=>
array
(
132
"namespace"
=>
"http://www.ilias.de/Modules/Folder/fold/4_1"
,
133
"xsd_file"
=>
"ilias_fold_4_1.xsd"
,
134
"uses_dataset"
=>
false
,
135
"min"
=>
"4.1.0"
,
136
"max"
=>
""
)
137
);
138
}
139
}
140
?>
ilContainerExporter
container structure export
Definition:
class.ilContainerExporter.php:17
ilPageObject\_exists
static _exists($a_parent_type, $a_id, $a_lang="", $a_no_cache=false)
Checks whether page exists.
Definition:
class.ilPageObject.php:365
ilContainerExporter\getValidSchemaVersions
getValidSchemaVersions($a_entity)
Returns schema versions that the component can export to.
Definition:
class.ilContainerExporter.php:128
$res
$res
Definition:
examplelayouts.sql.php:25
$GLOBALS
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
Definition:
generate-standalone.php:18
ilContainerExporter\$writer
$writer
Definition:
class.ilContainerExporter.php:19
ilContainerExporter\init
init()
Init export.
Definition:
class.ilContainerExporter.php:33
ilContainerExporter\__construct
__construct()
Constructor.
Definition:
class.ilContainerExporter.php:24
ilObjStyleSheet\lookupObjectStyle
static lookupObjectStyle($a_obj_id)
Lookup object style.
Definition:
class.ilObjStyleSheet.php:3774
ilObject\_getAllReferences
static _getAllReferences($a_id)
get all reference ids of object
Definition:
class.ilObject.php:902
ilXmlExporter
Xml Exporter class.
Definition:
class.ilXmlExporter.php:11
array
Create styles array
The data for the language used.
Definition:
40duplicateStyle.php:19
ilContainerXmlWriter
XML writer for container structure.
Definition:
class.ilContainerXmlWriter.php:15
php
ilContainerExporter\getXmlRepresentation
getXmlRepresentation($a_entity, $a_schema_version, $a_id)
Get xml.
Definition:
class.ilContainerExporter.php:110
ilContainerExporter\getXmlExportTailDependencies
getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids)
Definition:
class.ilContainerExporter.php:37
Services
Container
classes
class.ilContainerExporter.php
Generated on Fri Jan 17 2025 19:01:09 for ILIAS by
1.8.13 (using
Doxyfile
)