ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilFolderExporter.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
26{
27 public function init(): void
28 {
29 }
30
31 public function getXmlExportHeadDependencies(string $a_entity, string $a_target_release, array $a_ids): array
32 {
33 // always trigger container because of co-page(s)
34 return [
35 [
36 'component' => 'components/ILIAS/Container',
37 'entity' => 'struct',
38 'ids' => $a_ids
39 ]
40 ];
41 }
42
43 public function getXmlRepresentation(string $a_entity, string $a_schema_version, string $a_id): string
44 {
45 try {
46 $writer = null;
47 $writer = new ilFolderXmlWriter(false);
48 $writer->setObjId((int) $a_id);
49 $writer->write();
50 return $writer->xmlDumpMem(false);
51 } catch (UnexpectedValueException $e) {
52 $GLOBALS['ilLog']->write("Caught error: " . $e->getMessage());
53 return '';
54 }
55 }
56
57 public function getValidSchemaVersions(string $a_entity): array
58 {
59 return [
60 "4.1.0" => [
61 "namespace" => "https://www.ilias.de/Modules/Folder/fold/4_1",
62 "xsd_file" => "ilias_fold_4_1.xsd",
63 "uses_dataset" => false,
64 "min" => "4.1.0",
65 "max" => ""
66 ]
67 ];
68 }
69}
getXmlRepresentation(string $a_entity, string $a_schema_version, string $a_id)
getXmlExportHeadDependencies(string $a_entity, string $a_target_release, array $a_ids)
Get head dependencies.
getValidSchemaVersions(string $a_entity)
Returns schema versions that the component can export to.
XML writer for folders.
Xml Exporter class.
$GLOBALS["DIC"]
Definition: wac.php:54