ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilHTMLLearningModuleExporter.php
Go to the documentation of this file.
1<?php
2
24{
26
27 public function init(): void
28 {
29 $this->ds = new ilHTMLLearningModuleDataSet();
30 $this->ds->initByExporter($this);
31 $this->ds->setDSPrefix("ds");
32 }
33
34 public function getXmlExportTailDependencies(string $a_entity, string $a_target_release, array $a_ids): array
35 {
36 $deps = [];
37 $md_ids = [];
38 foreach ($a_ids as $id) {
39 $md_ids[] = $id . ":0:htlm";
40 }
41
42 $deps[] = [
43 "component" => "components/ILIAS/MetaData",
44 "entity" => "md",
45 "ids" => $md_ids
46 ];
47
48 // service settings
49 $deps[] = [
50 "component" => "components/ILIAS/ILIASObject",
51 "entity" => "common",
52 "ids" => $a_ids
53 ];
54
55 return $deps;
56 }
57
58 public function getXmlRepresentation(string $a_entity, string $a_schema_version, string $a_id): string
59 {
60 $this->ds->initByExporter($this);
61 return $this->ds->getXmlRepresentation($a_entity, $a_schema_version, [$a_id], "", true, true);
62 }
63
64 public function getValidSchemaVersions(string $a_entity): array
65 {
66 return array(
67 "4.1.0" => array(
68 "namespace" => "https://www.ilias.de/Modules/HTMLLearningModule/htlm/4_1",
69 "xsd_file" => "ilias_htlm_4_1.xsd",
70 "uses_dataset" => true,
71 "min" => "4.1.0",
72 "max" => "")
73 );
74 }
75}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
HTML learning module data set class.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getValidSchemaVersions(string $a_entity)
Returns schema versions that the component can export to.
getXmlExportTailDependencies(string $a_entity, string $a_target_release, array $a_ids)
Get tail dependencies.
getXmlRepresentation(string $a_entity, string $a_schema_version, string $a_id)
Xml Exporter class.