ILIAS  release_8 Revision v8.24
class.ilFolderExporter.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
23{
24 public function init(): void
25 {
26 }
27
28 public function getXmlExportHeadDependencies(string $a_entity, string $a_target_release, array $a_ids): array
29 {
30 // always trigger container because of co-page(s)
31 return [
32 [
33 'component' => 'Services/Container',
34 'entity' => 'struct',
35 'ids' => $a_ids
36 ]
37 ];
38 }
39
40 public function getXmlRepresentation(string $a_entity, string $a_schema_version, string $a_id): string
41 {
42 try {
43 $writer = null;
44 $writer = new ilFolderXmlWriter(false);
45 $writer->setObjId((int) $a_id);
46 $writer->write();
47 return $writer->xmlDumpMem(false);
48 } catch (UnexpectedValueException $e) {
49 $GLOBALS['ilLog']->write("Caught error: " . $e->getMessage());
50 return '';
51 }
52 }
53
54 public function getValidSchemaVersions(string $a_entity): array
55 {
56 return [
57 "4.1.0" => [
58 "namespace" => "https://www.ilias.de/Modules/Folder/fold/4_1",
59 "xsd_file" => "ilias_fold_4_1.xsd",
60 "uses_dataset" => false,
61 "min" => "4.1.0",
62 "max" => ""
63 ]
64 ];
65 }
66}
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
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)
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.
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...