ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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 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 function getXmlExportTailDependencies($a_entity, $a_target_release, $a_ids)
38 {
39
40 include_once("./Modules/MediaCast/classes/class.ilObjMediaCast.php");
41 $mc_items_ids = array();
42
43 foreach ($a_ids as $id)
44 {
45 $mcst = new ilObjMediaCast($id, false);
46 $items = $mcst->readItems(true);
47 foreach ($items as $i)
48 {
49 $news_ids[] = $i["id"];
50 }
51 }
52
53 return array (
54 array(
55 "component" => "Services/News",
56 "entity" => "news",
57 "ids" => $news_ids)
58 );
59 }
60
69 public function getXmlRepresentation($a_entity, $a_schema_version, $a_id)
70 {
71 return $this->ds->getXmlRepresentation($a_entity, $a_schema_version, $a_id, "", true, true);
72 }
73
81 function getValidSchemaVersions($a_entity)
82 {
83 return array (
84 "5.0.0" => array(
85 "namespace" => "http://www.ilias.de/Modules/MediaCast/mcst/5_0",
86 "xsd_file" => "ilias_mcst_5_0.xsd",
87 "uses_dataset" => true,
88 "min" => "5.0.0",
89 "max" => ""),
90 "4.1.0" => array(
91 "namespace" => "http://www.ilias.de/Modules/MediaCast/mcst/4_1",
92 "xsd_file" => "ilias_mcst_4_1.xsd",
93 "uses_dataset" => true,
94 "min" => "4.1.0",
95 "max" => "")
96 );
97 }
98
99}
100
101?>
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.