ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
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 
4 include_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  "4.1.0" => array(
85  "namespace" => "http://www.ilias.de/Modules/MediaCast/mcst/4_1",
86  "xsd_file" => "ilias_mcst_4_1.xsd",
87  "uses_dataset" => true,
88  "min" => "4.1.0",
89  "max" => "")
90  );
91  }
92 
93 }
94 
95 ?>