ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
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 11 of file class.ilAdvancedMetaDataImporter.php.

Constructor & Destructor Documentation

◆ __construct()

ilAdvancedMetaDataImporter::__construct ( )

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

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

17  {
18  global $DIC;
19 
21  }
global $DIC
Definition: feed.php:28
__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 23 of file class.ilAdvancedMetaDataImporter.php.

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

28  : void {
29  $parser = new ilAdvancedMDParser($a_id, $a_mapping);
30  $parser->setXMLContent($a_xml);
31  $parser->startParsing();
32 
33  // records with imported values should be selected
34  foreach ($parser->getRecordIds() as $obj_id => $sub_types) {
36 
37  foreach ((array) $sub_types as $sub_type => $rec_ids) {
38  ilAdvancedMDRecord::saveObjRecSelection($obj_id, $sub_type, array_unique($rec_ids), false);
39  }
40  }
41  }
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: