4 include_once(
"./Services/Export/classes/class.ilXmlImporter.php");
32 include_once
'./Modules/Category/classes/class.ilObjCategory.php';
33 if ($new_id = $a_mapping->getMapping(
'Services/Container',
'objs', $a_id)) {
38 elseif ($new_id = $a_mapping->getMapping(
'Services/Container',
'refs', 0)) {
41 $this->category =
new ilObjCategory();
42 $this->category->create(
true);
45 include_once
'./Modules/Category/classes/class.ilCategoryXmlParser.php';
49 $parser->setCategory($this->category);
52 $a_mapping->addMapping(
'Modules/Category',
'cat', $a_id, $this->category->getId());
54 $GLOBALS[
'ilLog']->write(__METHOD__ .
': Parsing failed with message, "' . $e->getMessage() .
'".');
56 $GLOBALS[
'ilLog']->write(__METHOD__ .
': Parsing failed with message, "' . $e->getMessage() .
'".');
59 foreach ($a_mapping->getMappingsOfEntity(
'Services/Container',
'objs') as $old => $new) {
65 $a_mapping->addMapping(
68 $type .
":obj:" . $old,
73 $a_mapping->addMapping(
76 $type .
":obj:" . $old,
92 include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
93 $maps = $a_mapping->getMappingsOfEntity(
"Modules/Category",
"cat");
94 foreach ($maps as $old => $new) {
95 if ($old !=
"new_id" && (
int) $old > 0) {
97 $new_tax_ids = $a_mapping->getMapping(
"Services/Taxonomy",
"tax_usage_of_obj", $old);
98 $tax_ids = explode(
":", $new_tax_ids);
99 foreach ($tax_ids as $tid) {
finalProcessing($a_mapping)
Final processing.
SaxParserException thrown by ilSaxParser if property throwException is set.
static _getAllReferences($a_id)
get all reference ids of object
static _lookupType($a_id, $a_reference=false)
lookup object type
static saveUsage($a_tax_id, $a_obj_id)
Save Usage.
importXmlRepresentation($a_entity, $a_id, $a_xml, $a_mapping)
Import XML.
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.