ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilSkillExporter.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
27{
30
31 public function init(): void
32 {
33 $this->ds = new ilSkillDataSet();
34 $this->ds->initByExporter($this);
35 $this->ds->setDSPrefix("ds");
37 $config = $this->getExport()->getExportConfigs()->getElementByComponent('components/ILIAS/Skill');
38 $this->config = $config;
39 $this->ds->setSelectedNodes($this->config->getSelectedNodes());
40 $this->ds->setSelectedProfiles($this->config->getSelectedProfiles());
41 $this->ds->setMode($this->config->getMode());
42 $this->ds->setSkillTreeId($this->config->getSkillTreeId());
43 }
44
48 public function getXmlRepresentation(string $a_entity, string $a_schema_version, string $a_id): string
49 {
50 return $this->ds->getXmlRepresentation($a_entity, $a_schema_version, [$a_id], "", true, true);
51 }
52
56 public function getValidSchemaVersions(string $a_entity): array
57 {
58 return array(
59 "8.0" => array(
60 "namespace" => "http://www.ilias.de/Services/Skill/skll/8_0",
61 "xsd_file" => "ilias_skll_8_0.xsd",
62 "uses_dataset" => true,
63 "min" => "8.0",
64 "max" => ""),
65 "7.0" => array(
66 "namespace" => "http://www.ilias.de/Services/Skill/skll/7_0",
67 "xsd_file" => "ilias_skll_7_0.xsd",
68 "uses_dataset" => true,
69 "min" => "7.0",
70 "max" => ""),
71 "5.1.0" => array(
72 "namespace" => "http://www.ilias.de/Services/Skill/skll/5_1",
73 "xsd_file" => "ilias_skll_5_1.xsd",
74 "uses_dataset" => true,
75 "min" => "5.1.0",
76 "max" => "")
77 );
78 }
79}
Skill Data set class.
Export configuration for skills.
Exporter class for skills.
ilSkillExportConfig $config
getValidSchemaVersions(string $a_entity)
Returns schema versions that the component can export to.ILIAS chooses the first one,...
getXmlRepresentation(string $a_entity, string $a_schema_version, string $a_id)
Xml Exporter class.