ILIAS  trunk Revision v12.0_alpha-16-g3e876e53c80
ilConditionsExporter Class Reference
+ Inheritance diagram for ilConditionsExporter:
+ Collaboration diagram for ilConditionsExporter:

Public Member Functions

 init ()
 
 getXmlRepresentation (string $a_entity, string $a_schema_version, string $a_id)
 
 getValidSchemaVersions (string $a_entity)
 Returns schema versions that the component can export to. More...
 
- 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 Attributes

const string ENTITY = 'cond'
 
ConditionExportFactory $factory
 
ilTree $tree
 
- Protected Attributes inherited from ilXmlExporter
ilExport $exp
 

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="")
 

Detailed Description

Definition at line 23 of file class.ilConditionsExporter.php.

Member Function Documentation

◆ getValidSchemaVersions()

ilConditionsExporter::getValidSchemaVersions ( string  $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. Example: return array ( "4.1.0" => array( "namespace" => "http://www.ilias.de/Services/MetaData/md/4_1", "xsd_file" => "ilias_md_4_1.xsd", "min" => "4.1.0", "max" => "") );

Reimplemented from ilXmlExporter.

Definition at line 58 of file class.ilConditionsExporter.php.

60 : array {
61 return [
62 "11.0" => [
63 "namespace" => "http://www.ilias.de/Components/Conditions/cond/11_0",
64 "xsd_file" => "ilias_cond_11_0.xsd",
65 "min" => "11.0",
66 "max" => ""
67 ]
68 ];
69 }

◆ getXmlRepresentation()

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

Reimplemented from ilXmlExporter.

Definition at line 36 of file class.ilConditionsExporter.php.

40 : string {
41 if ($a_entity !== self::ENTITY) {
42 return '';
43 }
44 $ref_id = min(ilObject::_getAllReferences((int) $a_id));
45 $obj_ids = [];
46 foreach ($this->tree->getSubTree($this->tree->getNodeData($ref_id)) as $node) {
47 if (((int) $node['obj_id']) === (int) $a_id) {
48 continue;
49 }
50 $obj_ids[] = (int) $node['obj_id'];
51 }
52 $infos = $this->factory->repository()->getInfosByObjectIds($obj_ids);
53 $writer = $this->factory->xmlWriter();
54 $writer->writeAll($infos);
55 return $writer->__toString();
56 }
factory()
static _getAllReferences(int $id)
get all reference ids for object ID
$ref_id
Definition: ltiauth.php:66

◆ init()

ilConditionsExporter::init ( )

Reimplemented from ilXmlExporter.

Definition at line 29 of file class.ilConditionsExporter.php.

29 : void
30 {
31 global $DIC;
32 $this->factory = new ConditionExportFactory($DIC->database());
33 $this->tree = $DIC->repositoryTree();
34 }
global $DIC
Definition: shib_login.php:26

References $DIC, and factory().

+ Here is the call graph for this function:

Field Documentation

◆ $factory

ConditionExportFactory ilConditionsExporter::$factory
protected

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

◆ $tree

ilTree ilConditionsExporter::$tree
protected

Definition at line 27 of file class.ilConditionsExporter.php.

◆ ENTITY

const string ilConditionsExporter::ENTITY = 'cond'
protected

Definition at line 25 of file class.ilConditionsExporter.php.


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