ILIAS  trunk Revision v11.0_alpha-1753-gb21ca8c4367
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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;
37 
38  public function __construct()
39  {
41  $this->_dataset = new ilCmiXapiDataSet();
42  $this->_dataset->initByExporter($this);
43  $this->_dataset->setDSPrefix("ds");
44 
45  /*
46  $this->main_object = $a_main_object;
47  include_once("./components/ILIAS/CmiXapi/classes/class.ilCmiXapiDataSet.php");
48  $this->dataset = new ilCmiXapiDataSet($this->main_object->getRefId());
49  $this->getXmlRepresentation(self::ENTITY, self::SCHEMA_VERSION, $this->main_object->getRefId());
50  */
51  }
52 
53  public function init(): void
54  {
55  }
56 
60  public function getXmlRepresentation(string $a_entity, string $a_schema_version, string $a_id): string
61  {
62  return $this->_dataset->getCmiXapiXmlRepresentation($a_entity, $a_schema_version, [$a_id], "", true, true);
63  }
64 
66  string $a_entity,
67  string $a_target_release,
68  array $a_ids
69  ): array {
70  $dependencies = [];
71 
72  $md_ids = [];
73  foreach ($a_ids as $id) {
74  $md_ids[] = $id . ":0:cmix";
75  }
76  if ($md_ids !== []) {
77  $dependencies[] = [
78  "component" => "components/ILIAS/MetaData",
79  "entity" => "md",
80  "ids" => $md_ids
81  ];
82  }
83 
84  return $dependencies;
85  }
86 
90  public function getValidSchemaVersions(string $a_entity): array
91  {
92  return array(
93  "5.1.0" => array(
94  "namespace" => "http://www.ilias.de/Modules/CmiXapi/cmix/5_1",
95  "xsd_file" => "xml/ilias_cmix_5_1.xsd",
96  "uses_dataset" => true,
97  "min" => "5.1.0",
98  "max" => "")
99  );
100  }
101 }
getXmlExportTailDependencies(string $a_entity, string $a_target_release, array $a_ids)
getValidSchemaVersions(string $a_entity)
ilCmiXapiDataSet $_dataset
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getXmlRepresentation(string $a_entity, string $a_schema_version, string $a_id)
Get xml representation.
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
__construct(Container $dic, ilPlugin $plugin)