ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilMediaCastImporter.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4include_once("./Services/Export/classes/class.ilXmlImporter.php");
5
14{
15
19 public function init()
20 {
21 include_once("./Modules/MediaCast/classes/class.ilMediaCastDataSet.php");
22 $this->ds = new ilMediaCastDataSet();
23 $this->ds->setDSPrefix("ds");
24 }
25
26
33 public function importXmlRepresentation($a_entity, $a_id, $a_xml, $a_mapping)
34 {
35 include_once("./Services/DataSet/classes/class.ilDataSetImportParser.php");
37 $a_entity,
38 $this->getSchemaVersion(),
39 $a_xml,
40 $this->ds,
41 $a_mapping
42 );
43 }
44
45 public function finalProcessing($a_mapping)
46 {
47 // restore manual order
48 $order = $this->ds->getOrder();
49 if (sizeof($order)) {
50 foreach ($order as $obj_id => $items) {
51 $map = array();
52 foreach ($items as $old_id) {
53 $map[] = $a_mapping->getMapping("Services/News", "news", $old_id);
54 }
55
56 $mcst = new ilObjMediaCast($obj_id, false);
57 $mcst->saveOrder($map);
58 }
59 }
60 }
61}
$parser
Definition: BPMN2Parser.php:23
An exception for terminatinating execution or to throw for unit testing.
Manifest parser for ILIAS standard export files.
Media cast data set class.
Importer class for media casts.
finalProcessing($a_mapping)
Final processing.
importXmlRepresentation($a_entity, $a_id, $a_xml, $a_mapping)
Import XML.
Class ilObjMediaCast.
Xml importer class.
getSchemaVersion()
Get schema version.