ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
ilSessionExporter Class Reference

Exporter class for sessions. More...

+ Inheritance diagram for ilSessionExporter:
+ Collaboration diagram for ilSessionExporter:

Public Member Functions

 init ()
 
 getXmlExportTailDependencies (string $a_entity, string $a_target_release, array $a_ids)
 
 getXmlRepresentation (string $a_entity, string $a_schema_version, string $a_id)
 
 getValidSchemaVersions (string $a_entity)
 
- 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

 getActiveAdvMDRecords (int $a_id)
 

Private Attributes

ilSessionDataSet $ds
 

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

Exporter class for sessions.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
Id

\

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

Member Function Documentation

◆ getActiveAdvMDRecords()

ilSessionExporter::getActiveAdvMDRecords ( int  $a_id)
protected

Definition at line 89 of file class.ilSessionExporter.php.

References ilAdvancedMDRecord\_getActivatedRecordsByObjectType().

Referenced by getXmlExportTailDependencies().

89  : array
90  {
91  $active = [];
92 
93  foreach (ilAdvancedMDRecord::_getActivatedRecordsByObjectType('sess') as $record_obj) {
94  foreach ($record_obj->getAssignedObjectTypes() as $obj_info) {
95  if ($obj_info['obj_type'] == 'sess' && $obj_info['optional'] == 0) {
96  $active[] = $record_obj->getRecordId();
97  }
98  // local activation
99  if (
100  $obj_info['obj_type'] == 'sess' &&
101  $obj_info['optional'] == 1 &&
102  $a_id == $record_obj->getParentObject()
103  ) {
104  $active[] = $record_obj->getRecordId();
105  }
106  }
107  }
108  return $active;
109  }
static _getActivatedRecordsByObjectType(string $a_obj_type, string $a_sub_type="", bool $a_only_optional=false)
Get activated records by object type.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getValidSchemaVersions()

ilSessionExporter::getValidSchemaVersions ( string  $a_entity)

Definition at line 116 of file class.ilSessionExporter.php.

116  : array
117  {
118  return [
119  "4.1.0" => [
120  "namespace" => "http://www.ilias.de/Modules/Session/sess/4_1",
121  "xsd_file" => "ilias_sess_4_1.xsd",
122  "uses_dataset" => true,
123  "min" => "4.1.0",
124  "max" => "4.4.999"
125  ],
126  "5.0.0" => [
127  "namespace" => "http://www.ilias.de/Modules/Session/sess/5_0",
128  "xsd_file" => "ilias_sess_5_0.xsd",
129  "uses_dataset" => true,
130  "min" => "5.0.0",
131  "max" => "5.0.999"
132  ],
133  "5.1.0" => [
134  "namespace" => "http://www.ilias.de/Modules/Session/sess/5_1",
135  "xsd_file" => "ilias_sess_5_1.xsd",
136  "uses_dataset" => true,
137  "min" => "5.1.0",
138  "max" => "5.3.999"
139  ],
140  "5.4.0" => [
141  "namespace" => "http://www.ilias.de/Modules/Session/sess/5_1",
142  "xsd_file" => "ilias_sess_5_1.xsd",
143  "uses_dataset" => true,
144  "min" => "5.4.0",
145  "max" => "5.4.99"
146  ],
147  "7.0" => [
148  "namespace" => "http://www.ilias.de/Modules/Session/sess/7",
149  "xsd_file" => "ilias_sess_7.xsd",
150  "uses_dataset" => true,
151  "min" => "7.0",
152  "max" => "8.99"
153  ],
154  "9.0" => [
155  "namespace" => "http://www.ilias.de/xml/Modules/Session/sess",
156  "xsd_file" => "ilias_sess_9.xsd",
157  "uses_dataset" => true,
158  "min" => "9.0",
159  "max" => ""
160  ]
161  ];
162  }

◆ getXmlExportTailDependencies()

ilSessionExporter::getXmlExportTailDependencies ( string  $a_entity,
string  $a_target_release,
array  $a_ids 
)

Definition at line 40 of file class.ilSessionExporter.php.

References $id, and getActiveAdvMDRecords().

40  : array
41  {
42  $deps = [];
43 
44  $advmd_ids = [];
45  foreach ($a_ids as $id) {
46  $rec_ids = $this->getActiveAdvMDRecords($id);
47  if (sizeof($rec_ids)) {
48  foreach ($rec_ids as $rec_id) {
49  $advmd_ids[] = $id . ":" . $rec_id;
50  }
51  }
52  }
53  if (sizeof($advmd_ids)) {
54  $deps[] = array(
55  "component" => "components/ILIAS/AdvancedMetaData",
56  "entity" => "advmd",
57  "ids" => $advmd_ids
58  );
59  }
60 
61  $md_ids = [];
62  foreach ($a_ids as $sess_id) {
63  $md_ids[] = $sess_id . ":0:sess";
64  }
65  if ($md_ids) {
66  $deps[] =
67  array(
68  "component" => "components/ILIAS/MetaData",
69  "entity" => "md",
70  "ids" => $md_ids
71  );
72  }
73 
74  // service settings
75  $deps[] = array(
76  "component" => "components/ILIAS/ILIASObject",
77  "entity" => "service_settings",
78  "ids" => $a_ids);
79 
80  // tile image
81  $deps[] = array(
82  "component" => "components/ILIAS/ILIASObject",
83  "entity" => "tile",
84  "ids" => $a_ids);
85 
86  return $deps;
87  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:24
+ Here is the call graph for this function:

◆ getXmlRepresentation()

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

Definition at line 111 of file class.ilSessionExporter.php.

111  : string
112  {
113  return $this->ds->getXmlRepresentation($a_entity, $a_schema_version, [$a_id], "", true, true);
114  }

◆ init()

ilSessionExporter::init ( )

Definition at line 33 of file class.ilSessionExporter.php.

33  : void
34  {
35  $this->ds = new ilSessionDataSet();
36  $this->ds->initByExporter($this);
37  $this->ds->setDSPrefix("ds");
38  }
Session data set class.

Field Documentation

◆ $ds

ilSessionDataSet ilSessionExporter::$ds
private

Definition at line 31 of file class.ilSessionExporter.php.


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