public function ReferencesImportSettings::postImport in CRM Core 7
Performs when import was successful.
Overrides CRMCoreDataImportSettings::postImport
File
- modules/
crm_core_data_import/ plugins/ settings/ ReferencesImportSettings.inc, line 39
Class
Code
public function postImport($importer, $item) {
$settings = $importer
->getSettings();
if (!empty($settings['references']['enable']) && !empty($settings['references']['fields']) && !is_a($importer->source_plugin, 'CivicrmDataSourceHandler')) {
$list = $importer->source_plugin
->getEntitiesForReferences($settings['references'], $item, $importer);
foreach ($list as $item) {
$this
->createReference($item['source_entity'], $item['destination_entity'], $item['plugin_data']);
}
}
}