Import XML.
68 $this->log->debug(
"entity: " . $a_entity .
", id: " . $a_id);
70 if ($a_entity ==
"pgtp") {
71 include_once(
"./Services/DataSet/classes/class.ilDataSetImportParser.php");
81 if ($a_entity ==
"pg") {
82 $pg_id = $a_mapping->getMapping(
"Services/COPage",
"pg", $a_id);
84 $this->log->debug(
"mapping id: " . $pg_id);
87 $id = explode(
":", $pg_id);
88 if (count(
$id) == 2) {
89 include_once(
"./Services/COPage/classes/class.ilPageObjectFactory.php");
91 while (substr($a_xml, 0, 11) ==
"<PageObject") {
92 $l1 = strpos($a_xml,
">");
94 $page_tag =
"<?xml version='1.0'?> " . substr($a_xml, 0, $l1+1) .
"</PageObject>";
95 $page_data = simplexml_load_string($page_tag);
96 $lstr = $page_data[
'Language'];
97 $p = strpos($a_xml,
"</PageObject>") + 13;
98 $next_xml =
"<PageObject>" . substr($a_xml, $l1+1, $p - $l1 -1);
100 if ($this->config->getForceLanguage() !=
"") {
101 $lstr = $this->config->getForceLanguage();
107 $next_xml = str_replace(
"&",
"&", $next_xml);
110 $page->setImportMode(
true);
111 $page->setXMLContent($next_xml);
112 $page->updateFromXML();
113 $this->extractPluginProperties($page);
116 $new_page->setImportMode(
true);
117 $new_page->setId(
$id[1]);
118 if ($lstr !=
"" && $lstr !=
"-") {
119 $new_page->setLanguage($lstr);
121 $new_page->setXMLContent($next_xml);
122 $new_page->setActive(
true);
124 if (isset($page_data[
"Active"])) {
125 $new_page->setActive($page_data[
"Active"]);
127 $new_page->setActivationStart($page_data[
"ActivationStart"]);
128 $new_page->setActivationEnd($page_data[
"ActivationEnd"]);
129 $new_page->setShowActivationInfo($page_data[
"ShowActivationInfo"]);
130 $new_page->createFromXML();
131 $this->extractPluginProperties($new_page);
134 $a_xml = substr($a_xml, $p);
138 $a_mapping->addMapping(
"Services/COPage",
"pgl", $a_id .
":" . $lstr, $pg_id .
":" . $lstr);
143 $this->log->debug(
"done");
static _exists($a_parent_type, $a_id, $a_lang="", $a_no_cache=false)
Checks whether page exists.
getSchemaVersion()
Get schema version.
if(!array_key_exists('StateId', $_REQUEST)) $id
Manifest parser for ILIAS standard export files.
static getInstance($a_parent_type, $a_id=0, $a_old_nr=0, $a_lang="-")
Get page object instance.