ILIAS  release_4-4 Revision
ilContainerReferenceExporter Class Reference

Class for category export. More...

+ Inheritance diagram for ilContainerReferenceExporter:
+ Collaboration diagram for ilContainerReferenceExporter:

Public Member Functions

 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...
 
 init ()
 Init method. 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...
 

Protected Member Functions

 initWriter (ilContainerReference $ref)
 

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

Class for category export.

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e $Id$

Definition at line 12 of file class.ilContainerReferenceExporter.php.

Member Function Documentation

◆ getValidSchemaVersions()

ilContainerReferenceExporter::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 81 of file class.ilContainerReferenceExporter.php.

82  {
83  return array (
84  "4.3.0" => array(
85  "namespace" => "http://www.ilias.de/Modules/CategoryReference/catr/4_3",
86  "xsd_file" => "ilias_catr_4_3.xsd",
87  "uses_dataset" => false,
88  "min" => "4.3.0",
89  "max" => "")
90  );
91  }

◆ getXmlExportHeadDependencies()

ilContainerReferenceExporter::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 22 of file class.ilContainerReferenceExporter.php.

References $GLOBALS, ilExportOptions\getInstance(), initWriter(), and ilExportOptions\KEY_ROOT.

23  {
24  include_once './Services/Export/classes/class.ilExportOptions.php';
26 
27  $obj_id = end($a_ids);
28 
29 
30  $GLOBALS['ilLog']->write(__METHOD__.': '.$obj_id);
31  if($eo->getOption(ilExportOptions::KEY_ROOT) != $obj_id)
32  {
33  return array();
34  }
35  if(count(ilExportOptions::getInstance()->getSubitemsForExport()) > 1)
36  {
37  return array(
38  array(
39  'component' => 'Services/Container',
40  'entity' => 'struct',
41  'ids' => $a_ids
42  )
43  );
44  }
45  return array();
46  }
static getInstance()
Get singelton instance.
$GLOBALS['ct_recipient']
+ Here is the call graph for this function:

◆ getXmlRepresentation()

ilContainerReferenceExporter::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 58 of file class.ilContainerReferenceExporter.php.

References $GLOBALS, ilObject\_getAllReferences(), ilObjectFactory\getInstanceByRefId(), initWriter(), and ilContainerReferenceXmlWriter\MODE_EXPORT.

59  {
60  $ref_ref_id = end(ilObject::_getAllReferences($a_id));
61  $ref = ilObjectFactory::getInstanceByRefId($ref_ref_id,false);
62 
63  if(!$ref instanceof ilContainerReference)
64  {
65  $GLOBALS['ilLog']->write(__METHOD__. $a_id . ' is not instance of type category!');
66  return '';
67  }
68  $writer = $this->initWriter($ref);
70  $writer->export(false);
71  return $writer->getXml();
72  }
getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
initWriter(ilContainerReference $ref)
static _getAllReferences($a_id)
get all reference ids of object
$GLOBALS['ct_recipient']
+ Here is the call graph for this function:

◆ init()

ilContainerReferenceExporter::init ( )

Init method.

Definition at line 96 of file class.ilContainerReferenceExporter.php.

96  {
97 
98  }

◆ initWriter()

ilContainerReferenceExporter::initWriter ( ilContainerReference  $ref)
abstractprotected

Referenced by getXmlExportHeadDependencies(), and getXmlRepresentation().

+ Here is the caller graph for this function:

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