ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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)
 
 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.

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

25  {
26  }

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

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

References array.

118  {
119  return array(
120  "4.1.0" => array(
121  "namespace" => "http://www.ilias.de/Modules/Folder/fold/4_1",
122  "xsd_file" => "ilias_fold_4_1.xsd",
123  "uses_dataset" => false,
124  "min" => "4.1.0",
125  "max" => "")
126  );
127  }
Create styles array
The data for the language used.

◆ getXmlExportTailDependencies()

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

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

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

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  if ($style_id > 0) {
79  $style_ids[] = $style_id;
80  }
81  }
82  if (sizeof($style_ids)) {
83  $res[] = array(
84  "component" => "Services/Style",
85  "entity" => "sty",
86  "ids" => $style_ids
87  );
88  }
89 
90  return $res;
91  }
static _exists($a_parent_type, $a_id, $a_lang="", $a_no_cache=false)
Checks whether page exists.
if(!array_key_exists('StateId', $_REQUEST)) $id
static lookupObjectStyle($a_obj_id)
Lookup object style.
foreach($_POST as $key=> $value) $res
Create styles array
The data for the language used.
+ 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

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

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

101  {
102  if ($a_entity == 'struct') {
103  $GLOBALS['ilLog']->write(__METHOD__ . ': Received id = ' . $a_id);
105  $writer->write();
106  return $writer->xmlDumpMem(false);
107  }
108  }
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
static _getAllReferences($a_id)
get all reference ids of object
XML writer for container structure.
+ Here is the call graph for this function:

◆ init()

ilContainerExporter::init ( )

Init export.

Returns

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

33  {
34  }

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: