public function CRMCoreDataImport::migrateSourceMap in CRM Core 7
Returns migrate source map from source plugin.
File
- modules/
crm_core_data_import/ includes/ controllers/ CRMCoreDataImport.inc, line 230 - Handler for data imports in CRM Core
Class
- CRMCoreDataImport
- @file Handler for data imports in CRM Core
Code
public function migrateSourceMap($entity_type, $entity_bundle, $delta) {
if ($destination = $this
->getDestinationsForEntity($entity_type, $entity_bundle, $delta)) {
$key = $destination->controller . ':' . $entity_bundle . ':' . $delta;
if ($mapping = $this
->getMappingSettings()) {
if (!empty($mapping[$key]['primary']['source_field_primary'])) {
$return = array(
$mapping[$key]['primary']['source_field_primary'] => array(
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
),
);
return $return;
}
}
}
return array();
}