ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
ilAdvancedMetaDataImporter Class Reference

Importer class for adv md. More...

+ Inheritance diagram for ilAdvancedMetaDataImporter:
+ Collaboration diagram for ilAdvancedMetaDataImporter:

Public Member Functions

 __construct ()
 
 importXmlRepresentation (string $a_entity, string $a_id, string $a_xml, 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)
 

Additional Inherited Members

- 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

Importer class for adv md.

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om

Definition at line 25 of file class.ilAdvancedMetaDataImporter.php.

Constructor & Destructor Documentation

◆ __construct()

ilAdvancedMetaDataImporter::__construct ( )

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

References $DIC, and ILIAS\GlobalScreen\Provider\__construct().

31  {
32  global $DIC;
33 
35  }
global $DIC
Definition: shib_login.php:26
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ importXmlRepresentation()

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

Definition at line 37 of file class.ilAdvancedMetaDataImporter.php.

References ilContainer\_writeContainerSetting(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, and ilAdvancedMDRecord\saveObjRecSelection().

42  : void {
43  $parser = new ilAdvancedMDParser($a_id, $a_mapping);
44  $parser->setXMLContent($a_xml);
45  $parser->startParsing();
46 
47  // records with imported values should be selected
48  foreach ($parser->getRecordIds() as $obj_id => $sub_types) {
50 
51  foreach ((array) $sub_types as $sub_type => $rec_ids) {
52  ilAdvancedMDRecord::saveObjRecSelection($obj_id, $sub_type, array_unique($rec_ids), false);
53  }
54  }
55  }
static saveObjRecSelection(int $a_obj_id, string $a_sub_type="", ?array $a_records=null, bool $a_delete_before=true)
Save repository object record selection.
static _writeContainerSetting(int $a_id, string $a_keyword, string $a_value)
+ Here is the call graph for this function:

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