ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilFolderImporter Class Reference

folder xml importer More...

+ Inheritance diagram for ilFolderImporter:
+ Collaboration diagram for ilFolderImporter:

Public Member Functions

 init ()
 
 importXmlRepresentation ($a_entity, $a_id, $a_xml, $a_mapping)
 Import XML. More...
 
- Public Member Functions inherited from ilXmlImporter
 __construct ()
 Constructor. More...
 
 setImport ($a_val)
 Set import. More...
 
 getImport ()
 Get import. More...
 
 init ()
 Init. More...
 
 setInstallId ($a_val)
 Set installation id. More...
 
 getInstallId ()
 Get installation id. More...
 
 setInstallUrl ($a_val)
 Set installation url. More...
 
 getInstallUrl ()
 Get installation url. More...
 
 setSchemaVersion ($a_val)
 Set schema version. More...
 
 getSchemaVersion ()
 Get schema version. More...
 
 setImportDirectory ($a_val)
 Set import directory. More...
 
 getImportDirectory ()
 Get import directory. More...
 
 setSkipEntities ($a_val)
 Set skip entities. More...
 
 getSkipEntities ()
 Get skip entities. More...
 
 exportedFromSameInstallation ()
 Is exporting and importing installation identical? More...
 
 importXmlRepresentation ($a_entity, $a_id, $a_xml, $a_mapping)
 Import xml representation. More...
 
 finalProcessing ($a_mapping)
 Final processing. More...
 
 afterContainerImportProcessing (ilImportMapping $mapping)
 Called after all container objects have been implemented. More...
 

Private Attributes

 $folder = null
 

Additional Inherited Members

- Protected Attributes inherited from ilXmlImporter
 $skip_entities = array()
 
 $imp
 

Detailed Description

folder xml importer

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 15 of file class.ilFolderImporter.php.

Member Function Documentation

◆ importXmlRepresentation()

ilFolderImporter::importXmlRepresentation (   $a_entity,
  $a_id,
  $a_xml,
  $a_mapping 
)

Import XML.

Parameters

Definition at line 30 of file class.ilFolderImporter.php.

References $GLOBALS, $parser, ilObjectFactory\getInstanceByObjId(), and ilObjectFactory\getInstanceByRefId().

31  {
32  include_once './Modules/Folder/classes/class.ilObjFolder.php';
33  if ($new_id = $a_mapping->getMapping('Services/Container', 'objs', $a_id)) {
34  $this->folder = ilObjectFactory::getInstanceByObjId($new_id, false);
35  } elseif ($new_id = $a_mapping->getMapping('Services/Container', 'refs', 0)) {
36  $this->folder = ilObjectFactory::getInstanceByRefId($new_id, false);
37  } elseif (!$this->folder instanceof ilObjFolder) {
38  $this->folder = new ilObjFolder();
39  $this->folder->create(true);
40  }
41 
42  include_once './Modules/Folder/classes/class.ilFolderXmlParser.php';
43 
44  try {
45  $parser = new ilFolderXmlParser($this->folder, $a_xml);
46  $parser->start();
47  $a_mapping->addMapping('Modules/Folder', 'fold', $a_id, $this->folder->getId());
48  } catch (ilSaxParserException $e) {
49  $GLOBALS['ilLog']->write(__METHOD__ . ': Parsing failed with message, "' . $e->getMessage() . '".');
50  } catch (ilWebLinkXMLParserException $e) {
51  $GLOBALS['ilLog']->write(__METHOD__ . ': Parsing failed with message, "' . $e->getMessage() . '".');
52  }
53  }
Class ilObjFolder.
SaxParserException thrown by ilSaxParser if property throwException is set.
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
XML parser for folder xml.
$parser
Definition: BPMN2Parser.php:23
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.
+ Here is the call graph for this function:

◆ init()

ilFolderImporter::init ( )

Definition at line 20 of file class.ilFolderImporter.php.

21  {
22  }

Field Documentation

◆ $folder

ilFolderImporter::$folder = null
private

Definition at line 17 of file class.ilFolderImporter.php.


The documentation for this class was generated from the following file: