ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilGroupImporter Class Reference

folder xml importer More...

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

Public Member Functions

 init ()
 Init.
 importXmlRepresentation ($a_entity, $a_id, $a_xml, $a_mapping)
 Import XML.
- Public Member Functions inherited from ilXmlImporter
 __construct ()
 Constructor.
 setInstallId ($a_val)
 Set installation id.
 getInstallId ()
 Get installation id.
 setInstallUrl ($a_val)
 Set installation url.
 getInstallUrl ()
 Get installation url.
 setSchemaVersion ($a_val)
 Set schema version.
 getSchemaVersion ()
 Get schema version.
 setImportDirectory ($a_val)
 Set import directory.
 getImportDirectory ()
 Get import directory.
 finalProcessing ($a_mapping)
 Final processing.

Private Attributes

 $group = null

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

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.

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

{
include_once './Modules/Group/classes/class.ilObjGroup.php';
if($new_id = $a_mapping->getMapping('Services/Container','objs',$a_id))
{
$refs = ilObject::_getAllReferences($new_id);
$this->group = ilObjectFactory::getInstanceByRefId(end($refs),false);
#$this->group = ilObjectFactory::getInstanceByObjId($new_id,false);
}
// Mapping for containers without subitems
elseif($new_id = $a_mapping->getMapping('Services/Container','refs',0))
{
$this->group = ilObjectFactory::getInstanceByRefId($new_id,false);
}
elseif(!$this->group instanceof ilObjGroup)
{
$this->group = new ilObjGroup();
$this->group->create(true);
}
include_once './Modules/Group/classes/class.ilGroupXMLParser.php';
#$GLOBALS['ilLog']->write($a_xml);
try
{
$parser = new ilGroupXMLParser($a_xml,0);
$parser->setGroup($this->group);
$parser->setMode(ilGroupXMLParser::$UPDATE);
$parser->startParsing();
$a_mapping->addMapping('Modules/Group','grp',$a_id,$this->group->getId());
}
{
$GLOBALS['ilLog']->write(__METHOD__.': Parsing failed with message, "'.$e->getMessage().'".');
}
catch(ilWebLinkXMLParserException $e)
{
$GLOBALS['ilLog']->write(__METHOD__.': Parsing failed with message, "'.$e->getMessage().'".');
}
}

+ Here is the call graph for this function:

ilGroupImporter::init ( )

Init.

Reimplemented from ilXmlImporter.

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

{
}

Field Documentation

ilGroupImporter::$group = null
private

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


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