ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilFolderExporter Class Reference

Folder export. More...

+ Inheritance diagram for ilFolderExporter:
+ Collaboration diagram for ilFolderExporter:

Public Member Functions

 __construct ()
 Constructor. More...
 
 init ()
 Init export. More...
 
 getXmlExportHeadDependencies ($a_entity, $a_target_release, $a_ids)
 Get head 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

Folder export.

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

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

Constructor & Destructor Documentation

◆ __construct()

ilFolderExporter::__construct ( )

Constructor.

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

25  {
26 
27  }

Member Function Documentation

◆ getValidSchemaVersions()

ilFolderExporter::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 112 of file class.ilFolderExporter.php.

References array.

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

◆ getXmlExportHeadDependencies()

ilFolderExporter::getXmlExportHeadDependencies (   $a_entity,
  $a_target_release,
  $a_ids 
)

Get head dependencies.

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

Definition at line 45 of file class.ilFolderExporter.php.

References array.

46  {
47  // always trigger container because of co-page(s)
48  return array(
49  array(
50  'component' => 'Services/Container',
51  'entity' => 'struct',
52  'ids' => $a_ids
53  )
54  );
55 
56  /*
57  include_once './Services/Export/classes/class.ilExportOptions.php';
58  $eo = ilExportOptions::getInstance();
59 
60  $obj_id = end($a_ids);
61 
62  if($eo->getOption(ilExportOptions::KEY_ROOT) != $obj_id)
63  {
64  return array();
65  }
66  if(count(ilExportOptions::getInstance()->getSubitemsForExport()) > 1)
67  {
68  return array(
69  array(
70  'component' => 'Services/Container',
71  'entity' => 'struct',
72  'ids' => $a_ids
73  )
74  );
75  }
76  return array();
77  */
78  }
Create styles array
The data for the language used.

◆ getXmlRepresentation()

ilFolderExporter::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 88 of file class.ilFolderExporter.php.

References $GLOBALS.

89  {
90  try
91  {
92  $this->writer = new ilFolderXmlWriter(false);
93  $this->writer->setObjId($a_id);
94  $this->writer->write();
95  return $this->writer->xmlDumpMem(false);
96 
97  }
98  catch(UnexpectedValueException $e)
99  {
100  $GLOBALS['ilLog']->write("Caught error: ".$e->getMessage());
101  return '';
102  }
103  }
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
XML writer for folders.

◆ init()

ilFolderExporter::init ( )

Init export.

Returns

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

34  {
35  }

Field Documentation

◆ $writer

ilFolderExporter::$writer = null
private

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


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