ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilPageComponentPluginImporter.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2017 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5include_once("./Services/Export/classes/class.ilXmlImporter.php");
6
16{
25 protected static $pc_properties = array();
26
32 protected static $pc_version = array();
33
34
42 public static function setPCProperties($a_id, $a_properties)
43 {
44 self::$pc_properties[$a_id] = $a_properties;
45 }
46
53 public static function getPCProperties($a_id)
54 {
55 if (isset(self::$pc_properties[$a_id])) {
56 return self::$pc_properties[$a_id];
57 } else {
58 return null;
59 }
60 }
61
69 public static function setPCVersion($a_id, $a_version)
70 {
71 self::$pc_version[$a_id] = $a_version;
72 }
73
80 public static function getPCVersion($a_id)
81 {
82 if (isset(self::$pc_version[$a_id])) {
83 return self::$pc_version[$a_id];
84 } else {
85 return null;
86 }
87 }
88
89
99 public static function getPCMapping($a_id, $a_mapping)
100 {
101 $parts = explode(':', $a_id);
102 $old_page_id = $parts[0] . ':' . $parts[1];
103 $new_page_id = $a_mapping->getMapping("Services/COPage", 'pg', $old_page_id);
104
105 return $new_page_id . ':' . $parts[2] . ':' . $parts[3];
106 }
107}
An exception for terminatinating execution or to throw for unit testing.
Abstract parent class for all page component plugin importer classes.
static getPCMapping($a_id, $a_mapping)
Get the id of the mapped page content The id structure should be irrelevant to child classes The mapp...
static getPCProperties($a_id)
Get the properties of a plugged page content.
static getPCVersion($a_id)
Get the version of a plugged page content.
static setPCProperties($a_id, $a_properties)
Set the properties of a plugged page content This method is used by ilCOPageExporter to provide the p...
static setPCVersion($a_id, $a_version)
Set the version of a plugged page content This method is used by ilCOPageExporter to provide the vers...
Xml importer class.