ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 return array(
51 array(
52 "component" => "Services/News",
53 "entity" => "news",
54 "ids" => $news_ids)
55 );
56 }
57
66 public function getXmlRepresentation($a_entity, $a_schema_version, $a_id)
67 {
68 return $this->ds->getXmlRepresentation($a_entity, $a_schema_version, $a_id, "", true, true);
69 }
70
78 public function getValidSchemaVersions($a_entity)
79 {
80 return array(
81 "5.0.0" => array(
82 "namespace" => "http://www.ilias.de/Modules/MediaCast/mcst/5_0",
83 "xsd_file" => "ilias_mcst_5_0.xsd",
84 "uses_dataset" => true,
85 "min" => "5.0.0",
86 "max" => ""),
87 "4.1.0" => array(
88 "namespace" => "http://www.ilias.de/Modules/MediaCast/mcst/4_1",
89 "xsd_file" => "ilias_mcst_4_1.xsd",
90 "uses_dataset" => true,
91 "min" => "4.1.0",
92 "max" => "")
93 );
94 }
95}
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