ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilUserExporter.php
Go to the documentation of this file.
1<?php
2
27{
30
31 public function init(): void
32 {
33 $this->data_set = new ilUserDataSet();
34 $this->data_set->initByExporter($this);
35 $this->data_set->setDSPrefix('ds');
37 $this->export_config = $this->exp->getExportConfigs()->getElementByClassName('ilUserExportConfig');
38 }
39
40 public function getXmlExportTailDependencies(string $a_entity, string $a_target_release, array $a_ids): array // Missing array type.
41 {
42 if ($a_entity === 'usr' && $this->export_config->getExportType() === 'personal_data') {
43 $cal_ids = [];
44 foreach ($a_ids as $user_id) {
46 $cal_ids[] = $ct["cat_id"];
47 }
48 }
49
50 return [
51 [
52 "component" => "components/ILIAS/User",
53 "entity" => "usr_profile",
54 "ids" => $a_ids],
55 [
56 "component" => "components/ILIAS/User",
57 "entity" => "usr_multi",
58 "ids" => $a_ids],
59 [
60 "component" => "components/ILIAS/User",
61 "entity" => "usr_setting",
62 "ids" => $a_ids],
63 [
64 "component" => "components/ILIAS/Notes",
65 "entity" => "user_notes",
66 "ids" => $a_ids],
67 [
68 "component" => "components/ILIAS/Calendar",
69 "entity" => "calendar",
70 "ids" => $cal_ids]
71 ];
72 }
73
74 return parent::getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids);
75 }
76
77 public function getXmlRepresentation(string $a_entity, string $a_schema_version, string $a_id): string
78 {
79 $this->data_set->initByExporter($this);
80 return $this->data_set->getXmlRepresentation($a_entity, $a_schema_version, [$a_id], "", true, true);
81 }
82
83 public function getValidSchemaVersions(string $a_entity): array // Missing array type.
84 {
85 return [
86 "4.3.0" => [
87 "namespace" => "https://www.ilias.de/Services/User/usr/4_3",
88 "xsd_file" => "ilias_usr_4_3.xsd",
89 "uses_dataset" => true,
90 "min" => "4.3.0",
91 "max" => "4.4.99"],
92 "5.1.0" => [
93 "namespace" => "https://www.ilias.de/Services/User/usr/5_1",
94 "xsd_file" => "ilias_usr_5_1.xsd",
95 "uses_dataset" => true,
96 "min" => "5.1.0",
97 "max" => "5.1.99"],
98 "5.2.0" => [
99 "namespace" => "https://www.ilias.de/Services/User/usr/5_2",
100 "xsd_file" => "ilias_usr_5_2.xsd",
101 "uses_dataset" => true,
102 "min" => "5.2.0",
103 "max" => "5.2.99"],
104 "5.3.0" => [
105 "namespace" => "https://www.ilias.de/Services/User/usr/5_3",
106 "xsd_file" => "ilias_usr_5_3.xsd",
107 "uses_dataset" => true,
108 "min" => "5.3.0",
109 "max" => ""]
110 ];
111 }
112}
static lookupPrivateCategories(int $a_user_id)
Lookup private categories of user.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getXmlExportTailDependencies(string $a_entity, string $a_target_release, array $a_ids)
Get tail dependencies.
ilUserDataSet $data_set
getValidSchemaVersions(string $a_entity)
Returns schema versions that the component can export to.
ilUserExportConfig $export_config
getXmlRepresentation(string $a_entity, string $a_schema_version, string $a_id)
Xml Exporter class.