ILIAS  release_7 Revision v7.30-3-g800a261c036
ilGroupImporter Class Reference

folder xml importer More...

+ Inheritance diagram for ilGroupImporter:
+ Collaboration diagram for ilGroupImporter:

Public Member Functions

 init ()
 Init. More...
 
 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

 $group = 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.ilGroupImporter.php.

Member Function Documentation

◆ importXmlRepresentation()

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

Import XML.

Parameters

return

Reimplemented from ilXmlImporter.

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

31 {
32 include_once './Modules/Group/classes/class.ilObjGroup.php';
33 if ($new_id = $a_mapping->getMapping('Services/Container', 'objs', $a_id)) {
34 $refs = ilObject::_getAllReferences($new_id);
35 $this->group = ilObjectFactory::getInstanceByRefId(end($refs), false);
36 #$this->group = ilObjectFactory::getInstanceByObjId($new_id,false);
37 }
38 // Mapping for containers without subitems
39 elseif ($new_id = $a_mapping->getMapping('Services/Container', 'refs', 0)) {
40 $this->group = ilObjectFactory::getInstanceByRefId($new_id, false);
41 } elseif (!$this->group instanceof ilObjGroup) {
42 $this->group = new ilObjGroup();
43 $this->group->create(true);
44 }
45
46 include_once './Modules/Group/classes/class.ilGroupXMLParser.php';
47 #$GLOBALS['DIC']['ilLog']->write($a_xml);
48
49 try {
50 $parser = new ilGroupXMLParser($this->group, $a_xml, 0);
51 $parser->setMode(ilGroupXMLParser::$UPDATE);
52 $parser->startParsing();
53 $a_mapping->addMapping('Modules/Group', 'grp', $a_id, $this->group->getId());
54 } catch (ilSaxParserException $e) {
55 $GLOBALS['DIC']->logger()->grp()->warning('Parsing failed with message, "' . $e->getMessage() . '".');
56 } catch (ilWebLinkXMLParserException $e) {
57 $GLOBALS['DIC']->logger()->grp()->warning('Parsing failed with message, "' . $e->getMessage() . '".');
58 }
59 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
Group Import Parser.
Class ilObjGroup.
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
static _getAllReferences($a_id)
get all reference ids of object
SaxParserException thrown by ilSaxParser if property throwException is set.

References Vendor\Package\$e, $GLOBALS, ilGroupXMLParser\$UPDATE, ilObject\_getAllReferences(), and ilObjectFactory\getInstanceByRefId().

+ Here is the call graph for this function:

◆ init()

ilGroupImporter::init ( )

Init.

Reimplemented from ilXmlImporter.

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

21 {
22 }

Field Documentation

◆ $group

ilGroupImporter::$group = null
private

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


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