ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ 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
32
public
function
init
()
33
{
34
}
35
36
public
function
getXmlExportTailDependencies
($a_entity, $a_target_release, $a_ids)
37
{
38
if
($a_entity !=
'struct'
) {
39
return
;
40
}
41
42
43
$res
= array();
44
45
// pages
46
47
$pg_ids = array();
48
49
// container pages
50
include_once(
"./Services/Container/classes/class.ilContainerPage.php"
);
51
foreach
($a_ids as
$id
) {
52
if
(
ilContainerPage::_exists
(
"cont"
, $id)) {
53
$pg_ids[] =
"cont:"
.
$id
;
54
}
55
}
56
57
// container start objects pages
58
include_once(
"./Services/Container/classes/class.ilContainerStartObjectsPage.php"
);
59
foreach
($a_ids as $id) {
60
if
(
ilContainerStartObjectsPage::_exists
(
"cstr"
, $id)) {
61
$pg_ids[] =
"cstr:"
.
$id
;
62
}
63
}
64
65
if
(
sizeof
($pg_ids)) {
66
$res
[] = array(
67
"component"
=>
"Services/COPage"
,
68
"entity"
=>
"pg"
,
69
"ids"
=> $pg_ids
70
);
71
}
72
73
// style
74
$style_ids = array();
75
foreach
($a_ids as $id) {
76
include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php"
);
77
$style_id =
ilObjStyleSheet::lookupObjectStyle
($id);
78
// see #24888
79
$style_id =
ilObjStyleSheet::getEffectiveContentStyleId
($style_id);
80
if
($style_id > 0) {
81
$style_ids[] = $style_id;
82
}
83
}
84
if
(
sizeof
($style_ids)) {
85
$res
[] = array(
86
"component"
=>
"Services/Style"
,
87
"entity"
=>
"sty"
,
88
"ids"
=> $style_ids
89
);
90
}
91
92
// service settings
93
$res
[] = array(
94
"component"
=>
"Services/Object"
,
95
"entity"
=>
"common"
,
96
"ids"
=> $a_ids);
97
98
// news settings
99
$res
[] = [
100
"component"
=>
"Services/News"
,
101
"entity"
=>
"news_settings"
,
102
"ids"
=> $a_ids
103
];
104
105
return
$res
;
106
}
107
115
public
function
getXmlRepresentation
($a_entity, $a_schema_version, $a_id)
116
{
117
global
$DIC
;
118
119
$log
= $DIC->logger()->root();
120
if
($a_entity ==
'struct'
) {
121
$log
->debug(__METHOD__ .
': Received id = '
. $a_id);
122
$writer
=
new
ilContainerXmlWriter
(end(
ilObject::_getAllReferences
($a_id)));
123
$writer
->write();
124
return
$writer
->xmlDumpMem(
false
);
125
}
126
}
127
135
public
function
getValidSchemaVersions
($a_entity)
136
{
137
return
array(
138
"4.1.0"
=> array(
139
"namespace"
=>
"http://www.ilias.de/Modules/Folder/fold/4_1"
,
140
"xsd_file"
=>
"ilias_fold_4_1.xsd"
,
141
"uses_dataset"
=>
false
,
142
"min"
=>
"4.1.0"
,
143
"max"
=>
""
)
144
);
145
}
146
}
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:407
ilContainerExporter\getValidSchemaVersions
getValidSchemaVersions($a_entity)
Returns schema versions that the component can export to.
Definition:
class.ilContainerExporter.php:135
$DIC
global $DIC
Definition:
saml.php:7
$id
if(!array_key_exists('StateId', $_REQUEST)) $id
Definition:
expirywarning.php:14
ilContainerExporter\$writer
$writer
Definition:
class.ilContainerExporter.php:19
ilContainerExporter\init
init()
Init export.
Definition:
class.ilContainerExporter.php:32
$log
$log
Definition:
sabredav.php:21
ilContainerExporter\__construct
__construct()
Constructor.
Definition:
class.ilContainerExporter.php:24
ilObjStyleSheet\lookupObjectStyle
static lookupObjectStyle($a_obj_id)
Lookup object style.
Definition:
class.ilObjStyleSheet.php:3658
ilObject\_getAllReferences
static _getAllReferences($a_id)
get all reference ids of object
Definition:
class.ilObject.php:965
ilXmlExporter
Xml Exporter class.
Definition:
class.ilXmlExporter.php:11
$res
foreach($_POST as $key=> $value) $res
Definition:
save_question_post_data.php:15
ilObjStyleSheet\getEffectiveContentStyleId
static getEffectiveContentStyleId($a_style_id, $a_type="")
Get effective Style Id.
Definition:
class.ilObjStyleSheet.php:1752
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:115
ilContainerExporter\getXmlExportTailDependencies
getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids)
Definition:
class.ilContainerExporter.php:36
Services
Container
classes
class.ilContainerExporter.php
Generated on Thu Jan 16 2025 19:02:19 for ILIAS by
1.8.13 (using
Doxyfile
)