ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilCategoryImporter Class Reference

folder xml importer More...

+ Inheritance diagram for ilCategoryImporter:
+ Collaboration diagram for ilCategoryImporter:

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.
 setSkipEntities ($a_val)
 Set skip entities.
 getSkipEntities ()
 Get skip entities.
 finalProcessing ($a_mapping)
 Final processing.

Private Attributes

 $category = null

Additional Inherited Members

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

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.ilCategoryImporter.php.

Member Function Documentation

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

Import XML.

Parameters
@return

Reimplemented from ilXmlImporter.

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

References $GLOBALS, ilObject\_getAllReferences(), ilObjectFactory\getInstanceByRefId(), and ilCategoryXmlParser\MODE_UPDATE.

{
include_once './Modules/Category/classes/class.ilObjCategory.php';
if($new_id = $a_mapping->getMapping('Services/Container','objs',$a_id))
{
$refs = ilObject::_getAllReferences($new_id);
$this->category = ilObjectFactory::getInstanceByRefId(end($refs),false);
}
// Mapping for containers without subitems
elseif($new_id = $a_mapping->getMapping('Services/Container','refs',0))
{
$this->category = ilObjectFactory::getInstanceByRefId($new_id,false);
}
elseif(!$this->category instanceof ilObjCategory)
{
$this->category = new ilObjCategory();
$this->category->create(true);
}
include_once './Modules/Category/classes/class.ilCategoryXmlParser.php';
try
{
$parser = new ilCategoryXmlParser($a_xml,0);
$parser->setCategory($this->category);
$parser->startParsing();
$a_mapping->addMapping('Modules/Category','cat',$a_id,$this->category->getId());
}
{
$GLOBALS['ilLog']->write(__METHOD__.': Parsing failed with message, "'.$e->getMessage().'".');
}
catch(Excpetion $e)
{
$GLOBALS['ilLog']->write(__METHOD__.': Parsing failed with message, "'.$e->getMessage().'".');
}
}

+ Here is the call graph for this function:

ilCategoryImporter::init ( )

Init.

Reimplemented from ilXmlImporter.

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

{
}

Field Documentation

ilCategoryImporter::$category = null
private

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


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