ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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...
 
 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...
 

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
 
 $exp
 

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

Reimplemented from ilXmlExporter.

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

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

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

Reimplemented from ilXmlExporter.

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

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 return array();
33 }
34 if (count(ilExportOptions::getInstance()->getSubitemsForExport()) > 1) {
35 return array(
36 array(
37 'component' => 'Services/Container',
38 'entity' => 'struct',
39 'ids' => $a_ids
40 )
41 );
42 }
43 return array();
44 }
static getInstance()
Get singelton instance.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.

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

+ 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

Reimplemented from ilXmlExporter.

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

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

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

+ Here is the call graph for this function:

◆ init()

ilContainerReferenceExporter::init ( )

Init method.

Reimplemented from ilXmlExporter.

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

94 {
95 }

◆ initWriter()

ilContainerReferenceExporter::initWriter ( ilContainerReference  $ref)
abstractprotected

Reimplemented in ilCategoryReferenceExporter, ilCourseReferenceExporter, and ilGroupReferenceExporter.

Referenced by getXmlRepresentation().

+ Here is the caller graph for this function:

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