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