ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
class.ilCmiXapiExporter.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
31 {
32  public const ENTITY = 'cmix';
33  public const SCHEMA_VERSION = '5.1.0';
34 
35  // private $main_object = null;
36  private ?ilCmiXapiDataSet $_dataset = null;
37 
38  public function __construct()
39  {
41  $this->_dataset = new ilCmiXapiDataSet();
42  $this->_dataset->setDSPrefix("ds");
43  }
44 
45  public function init(): void
46  {
47  }
48 
52  public function getXmlRepresentation(string $a_entity, string $a_schema_version, string $a_id): string
53  {
54  return $this->_dataset->getCmiXapiXmlRepresentation($a_entity, $a_schema_version, [$a_id], "", true, true);
55  }
56 
58  string $a_entity,
59  string $a_target_release,
60  array $a_ids
61  ): array {
62  $dependencies = [];
63 
64  $md_ids = [];
65  foreach ($a_ids as $id) {
66  $md_ids[] = $id . ":0:cmix";
67  }
68  if ($md_ids !== []) {
69  $dependencies[] = [
70  "component" => "components/ILIAS/MetaData",
71  "entity" => "md",
72  "ids" => $md_ids
73  ];
74  }
75 
76  return $dependencies;
77  }
78 
82  public function getValidSchemaVersions(string $a_entity): array
83  {
84  return array(
85  "5.1.0" => array(
86  "namespace" => "http://www.ilias.de/Modules/CmiXapi/cmix/5_1",
87  "xsd_file" => "xml/ilias_cmix_5_1.xsd",
88  "uses_dataset" => true,
89  "min" => "5.1.0",
90  "max" => "")
91  );
92  }
93 }
getXmlExportTailDependencies(string $a_entity, string $a_target_release, array $a_ids)
getValidSchemaVersions(string $a_entity)
ilCmiXapiDataSet $_dataset
getXmlRepresentation(string $a_entity, string $a_schema_version, string $a_id)
Get xml representation.
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:24
__construct(Container $dic, ilPlugin $plugin)