ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilContainerExporter Class Reference

container structure export More...

+ Inheritance diagram for ilContainerExporter:
+ Collaboration diagram for ilContainerExporter:

Public Member Functions

 __construct ()
 Constructor. More...
 
 init ()
 Init export. More...
 
 getXmlExportTailDependencies ($a_entity, $a_target_release, $a_ids)
 Get tail dependencies. More...
 
 getXmlRepresentation ($a_entity, $a_schema_version, $a_id)
 Get xml. More...
 
 getValidSchemaVersions ($a_entity)
 Returns schema versions that the component can export to. More...
 
- Public Member Functions inherited from ilXmlExporter
 __construct ()
 Constructor. More...
 
 setExport (ilExport $a_exp)
 Set export object. More...
 
 getExport ()
 Get export. More...
 
 getXmlRepresentation ($a_entity, $a_schema_version, $a_id)
 Get xml representation. More...
 
 init ()
 
 setExportDirectories ($a_dir_relative, $a_dir_absolute)
 Export directories. More...
 
 getRelativeExportDirectory ()
 Get relative export directory. More...
 
 getAbsoluteExportDirectory ()
 Get absolute export directory. More...
 
 getXmlExportHeadDependencies ($a_entity, $a_target_release, $a_ids)
 Get head dependencies. More...
 
 getXmlExportTailDependencies ($a_entity, $a_target_release, $a_ids)
 Get tail dependencies. More...
 
 getValidSchemaVersions ($a_entity)
 Returns schema versions that the component can export to. More...
 
 determineSchemaVersion ($a_entity, $a_target_release)
 Determine schema version. More...
 

Private Attributes

 $writer = null
 

Additional Inherited Members

- Static Public Member Functions inherited from ilXmlExporter
static lookupExportDirectory ($a_obj_type, $a_obj_id, $a_export_type='xml', $a_entity="")
 export directory lookup More...
 
- Protected Attributes inherited from ilXmlExporter
 $dir_relative
 
 $dir_absolute
 
 $exp
 

Detailed Description

container structure export

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 17 of file class.ilContainerExporter.php.

Constructor & Destructor Documentation

◆ __construct()

ilContainerExporter::__construct ( )

Constructor.

Reimplemented from ilXmlExporter.

Definition at line 24 of file class.ilContainerExporter.php.

25 {
26
27 }

Member Function Documentation

◆ getValidSchemaVersions()

ilContainerExporter::getValidSchemaVersions (   $a_entity)

Returns schema versions that the component can export to.

ILIAS chooses the first one, that has min/max constraints which fit to the target release. Please put the newest on top.

Returns

Reimplemented from ilXmlExporter.

Definition at line 128 of file class.ilContainerExporter.php.

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 }

◆ getXmlExportTailDependencies()

ilContainerExporter::getXmlExportTailDependencies (   $a_entity,
  $a_target_release,
  $a_ids 
)

Get tail dependencies.

Parameters
stringentity
stringtarget release
arrayids
Returns
array array of array with keys "component", entity", "ids"

Reimplemented from ilXmlExporter.

Definition at line 37 of file class.ilContainerExporter.php.

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 {
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/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 }
static lookupObjectStyle($a_obj_id)
Lookup object style.
static _exists($a_parent_type, $a_id, $a_lang="", $a_no_cache=false)
Checks whether page exists.

References $res, ilPageObject\_exists(), and ilObjStyleSheet\lookupObjectStyle().

+ Here is the call graph for this function:

◆ getXmlRepresentation()

ilContainerExporter::getXmlRepresentation (   $a_entity,
  $a_schema_version,
  $a_id 
)

Get xml.

Parameters
object$a_entity
object$a_schema_version
object$a_id
Returns

Reimplemented from ilXmlExporter.

Definition at line 110 of file class.ilContainerExporter.php.

111 {
112 if($a_entity == 'struct')
113 {
114 $GLOBALS['ilLog']->write(__METHOD__.': Received id = '.$a_id);
116 $writer->write();
117 return $writer->xmlDumpMem(false);
118 }
119 }
XML writer for container structure.
static _getAllReferences($a_id)
get all reference ids of object
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
Definition: CAS.php:276

References $GLOBALS, $writer, and ilObject\_getAllReferences().

+ Here is the call graph for this function:

◆ init()

ilContainerExporter::init ( )

Init export.

Returns

Reimplemented from ilXmlExporter.

Definition at line 33 of file class.ilContainerExporter.php.

34 {
35 }

Field Documentation

◆ $writer

ilContainerExporter::$writer = null
private

Definition at line 19 of file class.ilContainerExporter.php.

Referenced by getXmlRepresentation().


The documentation for this class was generated from the following file: