ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.ilFolderExporter.php
Go to the documentation of this file.
1 <?php
2 
19 declare(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 }
getXmlExportHeadDependencies(string $a_entity, string $a_target_release, array $a_ids)
getXmlRepresentation(string $a_entity, string $a_schema_version, string $a_id)
getValidSchemaVersions(string $a_entity)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
XML writer for folders.
$GLOBALS["DIC"]
Definition: wac.php:53