ILIAS  release_8 Revision v8.24
class.ilUserExporter.php
Go to the documentation of this file.
1<?php
2
27{
29
30 public function init(): void
31 {
32 $this->ds = new ilUserDataSet();
33 $this->ds->setExportDirectories($this->dir_relative, $this->dir_absolute);
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 = array();
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 array(
48 array(
49 "component" => "Services/User",
50 "entity" => "usr_profile",
51 "ids" => $a_ids),
52 array(
53 "component" => "Services/User",
54 "entity" => "usr_multi",
55 "ids" => $a_ids),
56 array(
57 "component" => "Services/User",
58 "entity" => "usr_setting",
59 "ids" => $a_ids),
60 array(
61 "component" => "Services/Notes",
62 "entity" => "user_notes",
63 "ids" => $a_ids),
64 array(
65 "component" => "Services/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->setExportDirectories($this->dir_relative, $this->dir_absolute);
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 array(
83 "4.3.0" => array(
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" => array(
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" => array(
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" => array(
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.
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...
getXmlExportTailDependencies(string $a_entity, string $a_target_release, array $a_ids)
Get tail dependencies.
getValidSchemaVersions(string $a_entity)
Returns schema versions that the component can export to.
getXmlRepresentation(string $a_entity, string $a_schema_version, string $a_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...