ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5
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 
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

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 
)

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

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

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 _exists($a_parent_type, $a_id, $a_lang="", $a_no_cache=false)
Checks whether page exists.
static lookupObjectStyle($a_obj_id)
Lookup object style.
+ 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 110 of file class.ilContainerExporter.php.

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

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  }
static _getAllReferences($a_id)
get all reference ids of object
XML writer for container structure.
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
Definition: CAS.php:276
+ Here is the call graph for this function:

◆ init()

ilContainerExporter::init ( )

Init export.

Returns

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: