function geolocation_migrate_field_info_alter in Geolocation Field 8.3
Implements hook_migrate_field_info_alter().
File
- ./
geolocation.module, line 108 - Defines a simple geolocation field type.
Code
function geolocation_migrate_field_info_alter(&$definitions) {
// Defines the location-to-geolocation migrate field plugin.
// This code also wants to replace the location-to-address migrate field
// plugin of Address module: a geolocation with latitude and longitude is way
// more accurate than a (partial) postal address.
if (\Drupal::moduleHandler()
->moduleExists('geolocation_address')) {
return;
}
$definitions['location'] = [
'type_map' => [
'location' => 'geolocation',
],
'weight' => 0,
'id' => 'location',
'core' => [
7,
],
'source_module' => 'location_cck',
'destination_module' => 'geolocation',
'class' => Location::class,
'provider' => 'geolocation',
];
}