ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilContainerReferenceExporter Class Reference

Class for category export. More...

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

Public Member Functions

 getXmlExportHeadDependencies (string $a_entity, string $a_target_release, array $a_ids)
 Get head dependencies. More...
 
 getXmlRepresentation (string $a_entity, string $a_schema_version, string $a_id)
 
 getValidSchemaVersions (string $a_entity)
 
 init ()
 
- Public Member Functions inherited from ilXmlExporter
 __construct ()
 
 setExport (ilExport $a_exp)
 
 getExport ()
 
 getXmlRepresentation (string $a_entity, string $a_schema_version, string $a_id)
 
 init ()
 
 setExportDirectories (string $a_dir_relative, string $a_dir_absolute)
 
 getRelativeExportDirectory ()
 
 getAbsoluteExportDirectory ()
 
 getXmlExportHeadDependencies (string $a_entity, string $a_target_release, array $a_ids)
 Get head dependencies. More...
 
 getXmlExportTailDependencies (string $a_entity, string $a_target_release, array $a_ids)
 Get tail dependencies. More...
 
 getValidSchemaVersions (string $a_entity)
 Returns schema versions that the component can export to. More...
 
 determineSchemaVersion (string $a_entity, string $a_target_release)
 

Protected Member Functions

 initWriter (ilContainerReference $ref)
 

Additional Inherited Members

- Static Public Member Functions inherited from ilXmlExporter
static lookupExportDirectory (string $a_obj_type, int $a_obj_id, string $a_export_type='xml', string $a_entity="")
 
- Protected Attributes inherited from ilXmlExporter
ilExport $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

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

Member Function Documentation

◆ getValidSchemaVersions()

ilContainerReferenceExporter::getValidSchemaVersions ( string  $a_entity)
Returns
array[]

Reimplemented from ilXmlExporter.

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

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

◆ getXmlExportHeadDependencies()

ilContainerReferenceExporter::getXmlExportHeadDependencies ( string  $a_entity,
string  $a_target_release,
array  $a_ids 
)

Get head dependencies.

Returns
array array of array with keys "component", entity", "ids"

Reimplemented from ilXmlExporter.

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

28 : array
29 {
30 global $DIC;
31
32 $log = $DIC->logger()->root();
33
35
36 $obj_id = end($a_ids);
37
38 $log->debug(__METHOD__ . ': ' . $obj_id);
39 if ($eo->getOption(ilExportOptions::KEY_ROOT) != $obj_id) {
40 return [];
41 }
42 if (count(ilExportOptions::getInstance()->getSubitemsForExport()) > 1) {
43 return [
44 [
45 'component' => 'components/ILIAS/Container',
46 'entity' => 'struct',
47 'ids' => $a_ids
48 ]
49 ];
50 }
51 return [];
52 }
$log
Definition: ltiresult.php:34
global $DIC
Definition: shib_login.php:26

References $DIC, $log, ilExportOptions\getInstance(), and ilExportOptions\KEY_ROOT.

+ Here is the call graph for this function:

◆ getXmlRepresentation()

ilContainerReferenceExporter::getXmlRepresentation ( string  $a_entity,
string  $a_schema_version,
string  $a_id 
)

Reimplemented from ilXmlExporter.

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

56 : string
57 {
58 global $DIC;
59
60 $log = $DIC->logger()->root();
61
62 $refs = ilObject::_getAllReferences((int) $a_id);
63 $ref_ref_id = end($refs);
64 $ref = ilObjectFactory::getInstanceByRefId($ref_ref_id, false);
65
66 if (!$ref instanceof ilContainerReference) {
67 $log->debug(__METHOD__ . $a_id . ' is not instance of type category!');
68 return '';
69 }
70 $writer = $this->initWriter($ref);
72 $writer->export(false);
73 return $writer->getXml();
74 }
initWriter(ilContainerReference $ref)
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
static _getAllReferences(int $id)
get all reference ids for object ID

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

+ Here is the call graph for this function:

◆ init()

ilContainerReferenceExporter::init ( )

Reimplemented from ilXmlExporter.

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

92 : void
93 {
94 }

◆ initWriter()

ilContainerReferenceExporter::initWriter ( ilContainerReference  $ref)
abstractprotected

Reimplemented in 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: