ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ilMediaPoolImporter Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

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

Public Member Functions

 init ()
 
 importXmlRepresentation (string $a_entity, string $a_id, string $a_xml, ilImportMapping $a_mapping)
 
 finalProcessing (ilImportMapping $a_mapping)
 
- Public Member Functions inherited from ilXmlImporter
 __construct ()
 
 setImport (ilImport $a_val)
 
 getImport ()
 
 init ()
 
 setInstallId (string $a_val)
 
 getInstallId ()
 
 setInstallUrl (string $a_val)
 
 getInstallUrl ()
 
 setSchemaVersion (string $a_val)
 
 getSchemaVersion ()
 
 setImportDirectory (string $a_val)
 
 getImportDirectory ()
 
 setSkipEntities (array $a_val)
 
 getSkipEntities ()
 
 exportedFromSameInstallation ()
 
 importXmlRepresentation (string $a_entity, string $a_id, string $a_xml, ilImportMapping $a_mapping)
 
 finalProcessing (ilImportMapping $a_mapping)
 
 afterContainerImportProcessing (ilImportMapping $mapping)
 

Protected Attributes

ilImportConfig $config
 
ilMediaPoolDataSet $ds
 
- Protected Attributes inherited from ilXmlImporter
array $skip_entities = array()
 
ilImport $imp
 
string $install_id
 
string $install_url
 
string $schema_version
 
string $import_directory
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Importer class for media pools

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

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

Member Function Documentation

◆ finalProcessing()

ilMediaPoolImporter::finalProcessing ( ilImportMapping  $a_mapping)

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

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

68  : void {
69  $pg_map = $a_mapping->getMappingsOfEntity("components/ILIAS/MediaPool", "pg");
70 
71  foreach ($pg_map as $pg_id) {
72  $mep_id = ilMediaPoolItem::getPoolForItemId($pg_id);
73  $mep_id = current($mep_id);
74  ilMediaPoolPage::_writeParentId("mep", $pg_id, $mep_id);
75  }
76  }
static getPoolForItemId(int $a_id)
static _writeParentId(string $a_parent_type, int $a_pg_id, int $a_par_id)
getMappingsOfEntity(string $a_comp, string $a_entity)
+ Here is the call graph for this function:

◆ importXmlRepresentation()

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

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

References ilXmlImporter\getSchemaVersion().

56  : void {
57  $parser = new ilDataSetImportParser(
58  $a_entity,
59  $this->getSchemaVersion(),
60  $a_xml,
61  $this->ds,
62  $a_mapping
63  );
64  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ init()

ilMediaPoolImporter::init ( )

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

References ilXmlImporter\getImport().

29  : void
30  {
31  $this->ds = new ilMediaPoolDataSet();
32  $this->ds->setDSPrefix("ds");
33 
34  $this->config = $this->getImport()->getConfig("components/ILIAS/MediaPool");
35  if ($this->config->getTranslationImportMode()) {
36  $this->ds->setTranslationImportMode(
37  $this->config->getTranslationMep(),
38  $this->config->getTranslationLang()
39  );
40  $cop_config = $this->getImport()->getConfig("components/ILIAS/COPage");
41  $cop_config->setUpdateIfExists(true);
42  $cop_config->setForceLanguage($this->config->getTranslationLang());
43  $cop_config->setReuseOriginallyExportedMedia(true);
44  $cop_config->setSkipInternalLinkResolve(true);
45 
46  $mob_config = $this->getImport()->getConfig("components/ILIAS/MediaObjects");
47  $mob_config->setUsePreviousImportIds(true);
48  }
49  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

Field Documentation

◆ $config

ilImportConfig ilMediaPoolImporter::$config
protected

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

◆ $ds

ilMediaPoolDataSet ilMediaPoolImporter::$ds
protected

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


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