Import class.
More...
|
| __construct ($a_target_id) |
| Constructor. More...
|
|
| __construct ($a_target_id=0) |
| Constructor. More...
|
|
| getConfig ($a_comp) |
| Get configuration (note that configurations are optional, null may be returned!) More...
|
|
| getMapping () |
| Get mapping object. More...
|
|
| setEntityTypes ($a_val) |
| Set entity types. More...
|
|
| getEntityTypes () |
| Get entity types. More...
|
|
| addSkipEntity ($a_component, $a_entity, $skip=true) |
| Add skip entity. More...
|
|
| setCurrentDataset ($a_val) |
| Set currrent dataset. More...
|
|
| getCurrentDataset () |
| Get currrent dataset. More...
|
|
| afterEntityTypes () |
| After entity types are parsed. More...
|
|
| importRecord ($a_entity, $a_types, $a_record) |
| After entity types are parsed. More...
|
|
| importEntity ($a_tmp_file, $a_filename, $a_entity, $a_component, $a_copy_file=false) |
| Import entity. More...
|
|
| importObject ($a_new_obj, $a_tmp_file, $a_filename, $a_type, $a_comp="", $a_copy_file=false) |
| Import repository object export file. More...
|
|
| importFromDirectory ($dir, $a_type, $a_comp) |
| Import from directory. More...
|
|
| getTemporaryImportDir () |
| Get temporary import directory. More...
|
|
| processItemXml ($a_entity, $a_schema_version, $a_id, $a_xml, $a_install_id, $a_install_url) |
| Process item xml. More...
|
|
Import class.
- Author
- Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
- Version
- $Id$
Definition at line 13 of file class.ilImportContainer.php.
◆ __construct()
ilImportContainer::__construct |
( |
|
$a_target_id | ) |
|
Constructor.
- Parameters
-
int | $a_target_id | Id of parent node |
- Returns
Definition at line 20 of file class.ilImportContainer.php.
22 parent::__construct($a_target_id);
◆ createDummy()
ilImportContainer::createDummy |
( |
|
$a_type | ) |
|
|
protected |
Create dummy object.
- Parameters
-
- Returns
Definition at line 91 of file class.ilImportContainer.php.
References $location, and ilImport\getMapping().
Referenced by doImportObject().
93 global $objDefinition;
95 $class_name =
"ilObj".$objDefinition->getClassName($a_type);
96 $location = $objDefinition->getLocation($a_type);
98 include_once(
$location.
"/class.".$class_name.
".php");
99 $new =
new $class_name();
100 $new->setTitle(
'Import');
102 $new->createReference();
103 $new->putInTree($this->
getMapping()->getTargetId());
104 $new->setPermissions($this->
getMapping()->getTargetId());
106 $this->
getMapping()->addMapping(
'Services/Container',
'objs', 0, $new->getId());
107 $this->
getMapping()->addMapping(
'Services/Container',
'refs', 0,$new->getRefId());
getMapping()
Get mapping object.
◆ doImportObject()
ilImportContainer::doImportObject |
( |
|
$dir, |
|
|
|
$type |
|
) |
| |
|
protected |
Import a container.
- Parameters
-
- Returns
Definition at line 32 of file class.ilImportContainer.php.
References $ret, createDummy(), and ilImport\getMapping().
34 $manifest_file = $dir.
"/manifest.xml";
35 if(!file_exists($manifest_file))
40 include_once(
"./Services/Export/classes/class.ilManifestParser.php");
50 $all_importers = array();
52 if(!$parser->getExportSets())
55 $import_info = parent::doImportObject($dir,$type);
57 $all_importers = array_merge($all_importers, $import_info[
'importers']);
64 foreach($parser->getExportSets() as $set)
66 $import_info = parent::doImportObject($dir.DIRECTORY_SEPARATOR.$set[
'path'],$set[
'type']);
68 $all_importers = array_merge($all_importers, $import_info[
'importers']);
77 foreach((array) $all_importers as $importer)
79 $importer->afterContainerImportProcessing($this->
getMapping());
createDummy($a_type)
Create dummy object.
getMapping()
Get mapping object.
Manifest parser for ILIAS standard export files.
The documentation for this class was generated from the following file: