ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
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...
 
 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
 

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.

Reimplemented from ilXmlExporter.

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

Reimplemented from ilXmlExporter.

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

102 {
103 return array (
104 "4.1.0" => array(
105 "namespace" => "http://www.ilias.de/Modules/Folder/fold/4_1",
106 "xsd_file" => "ilias_fold_4_1.xsd",
107 "uses_dataset" => false,
108 "min" => "4.1.0",
109 "max" => "")
110 );
111 }

◆ 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"

Reimplemented from ilXmlExporter.

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

46 {
47 include_once './Services/Export/classes/class.ilExportOptions.php';
49
50 $obj_id = end($a_ids);
51
52 if($eo->getOption(ilExportOptions::KEY_ROOT) != $obj_id)
53 {
54 return array();
55 }
56 if(count(ilExportOptions::getInstance()->getSubitemsForExport()) > 1)
57 {
58 return array(
59 array(
60 'component' => 'Services/Container',
61 'entity' => 'struct',
62 'ids' => $a_ids
63 )
64 );
65 }
66 return array();
67 }
static getInstance()
Get singelton instance.

References ilExportOptions\getInstance(), and ilExportOptions\KEY_ROOT.

+ Here is the call graph for this function:

◆ getXmlRepresentation()

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

78 {
79 try
80 {
81 $this->writer = new ilFolderXmlWriter(false);
82 $this->writer->setObjId($a_id);
83 $this->writer->write();
84 return $this->writer->xmlDumpMem(false);
85
86 }
87 catch(UnexpectedValueException $e)
88 {
89 $GLOBALS['ilLog']->write("Caught error: ".$e->getMessage());
90 return '';
91 }
92 }
XML writer for folders.
$GLOBALS['ct_recipient']

References $GLOBALS.

◆ init()

ilFolderExporter::init ( )

Init export.

Returns

Reimplemented from ilXmlExporter.

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: