ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilMediaCastExporter.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4include_once("./Services/Export/classes/class.ilXmlExporter.php");
5
14{
15 private $ds;
16
20 public function init()
21 {
22 include_once("./Modules/MediaCast/classes/class.ilMediaCastDataSet.php");
23 $this->ds = new ilMediaCastDataSet();
24 $this->ds->setExportDirectories($this->dir_relative, $this->dir_absolute);
25 $this->ds->setDSPrefix("ds");
26 }
27
28
37 public function getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids)
38 {
39 include_once("./Modules/MediaCast/classes/class.ilObjMediaCast.php");
40 $mc_items_ids = array();
41
42 foreach ($a_ids as $id) {
43 $mcst = new ilObjMediaCast($id, false);
44 $items = $mcst->readItems(true);
45 foreach ($items as $i) {
46 $news_ids[] = $i["id"];
47 }
48 }
49
50 $deps = [];
51
52 $deps[] = [
53 "component" => "Services/News",
54 "entity" => "news",
55 "ids" => $news_ids
56 ];
57
58 // common object properties
59 $deps[] = array(
60 "component" => "Services/Object",
61 "entity" => "common",
62 "ids" => $a_ids);
63
64 return $deps;
65 }
66
75 public function getXmlRepresentation($a_entity, $a_schema_version, $a_id)
76 {
77 return $this->ds->getXmlRepresentation($a_entity, $a_schema_version, $a_id, "", true, true);
78 }
79
87 public function getValidSchemaVersions($a_entity)
88 {
89 return array(
90 "5.0.0" => array(
91 "namespace" => "http://www.ilias.de/Modules/MediaCast/mcst/5_0",
92 "xsd_file" => "ilias_mcst_5_0.xsd",
93 "uses_dataset" => true,
94 "min" => "5.0.0",
95 "max" => ""),
96 "4.1.0" => array(
97 "namespace" => "http://www.ilias.de/Modules/MediaCast/mcst/4_1",
98 "xsd_file" => "ilias_mcst_4_1.xsd",
99 "uses_dataset" => true,
100 "min" => "4.1.0",
101 "max" => "")
102 );
103 }
104}
An exception for terminatinating execution or to throw for unit testing.
Media cast data set class.
Exporter class for media casts.
getXmlRepresentation($a_entity, $a_schema_version, $a_id)
Get xml representation.
getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids)
Get tail dependencies.
getValidSchemaVersions($a_entity)
Returns schema versions that the component can export to.
Class ilObjMediaCast.
Xml Exporter class.
$i
Definition: disco.tpl.php:19
if(!array_key_exists('StateId', $_REQUEST)) $id