ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilMediaPoolImporter Class Reference

Importer class for media pools. More...

+ Inheritance diagram for ilMediaPoolImporter:
+ Collaboration diagram for ilMediaPoolImporter:

Public Member Functions

 init ()
 Initialisation. More...
 
 importXmlRepresentation ($a_entity, $a_id, $a_xml, $a_mapping)
 Import XML. More...
 
 finalProcessing ($a_mapping)
 Final processing. 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 media pools.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
Id

Definition at line 13 of file class.ilMediaPoolImporter.php.

Member Function Documentation

◆ finalProcessing()

ilMediaPoolImporter::finalProcessing (   $a_mapping)

Final processing.

Parameters
arraymapping array

Definition at line 62 of file class.ilMediaPoolImporter.php.

References ilPageObject\_writeParentId(), and ilMediaPoolItem\getPoolForItemId().

63  {
64  $pg_map = $a_mapping->getMappingsOfEntity("Modules/MediaPool", "pg");
65 
66  include_once("./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
67  include_once("./Modules/MediaPool/classes/class.ilMediaPoolItem.php");
68  foreach ($pg_map as $pg_id)
69  {
70  $mep_id = ilMediaPoolItem::getPoolForItemId($pg_id);
71  $mep_id = current($mep_id);
72  ilMediaPoolPage::_writeParentId("mep", $pg_id, $mep_id);
73  }
74  }
static getPoolForItemId($a_id)
Get media pools for item id.
static _writeParentId($a_parent_type, $a_pg_id, $a_par_id)
Write parent id.
+ Here is the call graph for this function:

◆ importXmlRepresentation()

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

Import XML.

Parameters

Definition at line 50 of file class.ilMediaPoolImporter.php.

References $parser, and ilXmlImporter\getSchemaVersion().

51  {
52  include_once("./Services/DataSet/classes/class.ilDataSetImportParser.php");
53  $parser = new ilDataSetImportParser($a_entity, $this->getSchemaVersion(),
54  $a_xml, $this->ds, $a_mapping);
55  }
getSchemaVersion()
Get schema version.
Manifest parser for ILIAS standard export files.
$parser
Definition: BPMN2Parser.php:24
+ Here is the call graph for this function:

◆ init()

ilMediaPoolImporter::init ( )

Initialisation.

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

References ilXmlImporter\getImport().

20  {
21  include_once("./Modules/MediaPool/classes/class.ilMediaPoolDataSet.php");
22  $this->ds = new ilMediaPoolDataSet();
23  $this->ds->setDSPrefix("ds");
24 
25  $this->config = $this->getImport()->getConfig("Modules/MediaPool");
26  if ($this->config->getTranslationImportMode())
27  {
28  $this->ds->setTranslationImportMode(
29  $this->config->getTranslationLM(),
30  $this->config->getTranslationLang());
31  $cop_config = $this->getImport()->getConfig("Services/COPage");
32  $cop_config->setUpdateIfExists(true);
33  $cop_config->setForceLanguage($this->config->getTranslationLang());
34  $cop_config->setReuseOriginallyExportedMedia(true);
35  $cop_config->setSkipInternalLinkResolve(true);
36 
37  $mob_config = $this->getImport()->getConfig("Services/MediaObjects");
38  $mob_config->setUsePreviousImportIds(true);
39  }
40 
41  }
getImport()
Get import.
Media Pool Data set class.
+ Here is the call graph for this function:

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