ILIAS  trunk Revision v11.0_alpha-1769-g99a433fe2dc
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.ilMediaCastExporter.php
Go to the documentation of this file.
1 <?php
2 
25 {
27 
28  public function init(): void
29  {
30  $this->ds = new ilMediaCastDataSet();
31  $this->ds->initByExporter($this);
32  $this->ds->setDSPrefix("ds");
33  }
34 
36  string $a_entity,
37  string $a_target_release,
38  array $a_ids
39  ): array {
40  $news_ids = [];
41  foreach ($a_ids as $id) {
42  $mcst = new ilObjMediaCast($id, false);
43  $items = $mcst->readItems(true);
44  foreach ($items as $i) {
45  $news_ids[] = $i["id"];
46  }
47  }
48 
49  $deps = [];
50 
51  $deps[] = [
52  "component" => "components/ILIAS/News",
53  "entity" => "news",
54  "ids" => $news_ids
55  ];
56 
57  // common object properties
58  $deps[] = array(
59  "component" => "components/ILIAS/ILIASObject",
60  "entity" => "common",
61  "ids" => $a_ids);
62 
63  $md_ids = [];
64  foreach ($a_ids as $id) {
65  $md_ids[] = $id . ':0:mcst';
66  }
67  if (!empty($md_ids)) {
68  $deps[] = [
69  'component' => 'components/ILIAS/MetaData',
70  'entity' => 'md',
71  'ids' => $md_ids,
72  ];
73  }
74 
75  return $deps;
76  }
77 
78  public function getXmlRepresentation(
79  string $a_entity,
80  string $a_schema_version,
81  string $a_id
82  ): string {
83  return $this->ds->getXmlRepresentation($a_entity, $a_schema_version, [$a_id], "", true, true);
84  }
85 
86  public function getValidSchemaVersions(string $a_entity): array
87  {
88  return array(
89  "8.0" => array(
90  "namespace" => "https://www.ilias.de/Modules/MediaCast/mcst/8",
91  "xsd_file" => "ilias_mcst_8.xsd",
92  "uses_dataset" => true,
93  "min" => "8.0",
94  "max" => ""),
95  "5.0.0" => array(
96  "namespace" => "https://www.ilias.de/Modules/MediaCast/mcst/5_0",
97  "xsd_file" => "ilias_mcst_5_0.xsd",
98  "uses_dataset" => true,
99  "min" => "5.0.0",
100  "max" => "5.4.99"),
101  "4.1.0" => array(
102  "namespace" => "https://www.ilias.de/Modules/MediaCast/mcst/4_1",
103  "xsd_file" => "ilias_mcst_4_1.xsd",
104  "uses_dataset" => true,
105  "min" => "4.1.0",
106  "max" => "")
107  );
108  }
109 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getXmlRepresentation(string $a_entity, string $a_schema_version, string $a_id)
getValidSchemaVersions(string $a_entity)
getXmlExportTailDependencies(string $a_entity, string $a_target_release, array $a_ids)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...