ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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  }

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

108  {
109  return array(
110  "4.1.0" => array(
111  "namespace" => "http://www.ilias.de/Modules/Folder/fold/4_1",
112  "xsd_file" => "ilias_fold_4_1.xsd",
113  "uses_dataset" => false,
114  "min" => "4.1.0",
115  "max" => "")
116  );
117  }

◆ 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 44 of file class.ilFolderExporter.php.

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

◆ 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 87 of file class.ilFolderExporter.php.

References $GLOBALS.

88  {
89  try {
90  $this->writer = new ilFolderXmlWriter(false);
91  $this->writer->setObjId($a_id);
92  $this->writer->write();
93  return $this->writer->xmlDumpMem(false);
94  } catch (UnexpectedValueException $e) {
95  $GLOBALS['ilLog']->write("Caught error: " . $e->getMessage());
96  return '';
97  }
98  }
XML writer for folders.
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.

◆ init()

ilFolderExporter::init ( )

Init export.

Returns

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

33  {
34  }

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: