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

Importer class for forums. More...

+ Inheritance diagram for ilForumImporter:
+ Collaboration diagram for ilForumImporter:

Public Member Functions

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

Additional Inherited Members

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

Detailed Description

Importer class for forums.

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

Definition at line 11 of file class.ilForumImporter.php.

Member Function Documentation

◆ importXmlRepresentation()

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

Import XML.

Parameters

Definition at line 19 of file class.ilForumImporter.php.

References $parser, ilXmlImporter\getImportDirectory(), ilXmlImporter\getInstallId(), ilObjectFactory\getInstanceByObjId(), and ilXmlImporter\getSchemaVersion().

20  {
21  // case i container
22  if ($new_id = $a_mapping->getMapping('Services/Container', 'objs', $a_id)) {
23  $newObj = ilObjectFactory::getInstanceByObjId($new_id, false);
24  } else { // case ii, non container
25  $newObj = new ilObjForum();
26  $newObj->setType('frm');
27  $newObj->create();
28  }
29 
30  $parser = new ilForumXMLParser($newObj, $a_xml);
31  $parser->setImportDirectory($this->getImportDirectory());
32  $parser->setImportInstallId($this->getInstallId());
33  $parser->setSchemaVersion($this->getSchemaVersion());
34  $parser->startParsing();
35 
36  $a_mapping->addMapping("Modules/Forum", "frm", $a_id, $newObj->getId());
37  }
getSchemaVersion()
Get schema version.
getImportDirectory()
Get import directory.
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
$parser
Definition: BPMN2Parser.php:23
getInstallId()
Get installation id.
Class ilObjForum.
+ Here is the call graph for this function:

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