geolocation_geometry_germany_zip_codes.install in Geolocation Field 8.3
Geolocation Geometry country import.
File
modules/geolocation_geometry/modules/geolocation_geometry_germany_zip_codes/geolocation_geometry_germany_zip_codes.installView source
<?php
/**
* @file
* Geolocation Geometry country import.
*/
/**
* Implements hook_install().
*/
function geolocation_geometry_germany_zip_codes_install() {
/** @var \Drupal\geolocation_geometry_data\GeolocationGeometryDataManager $geometry_data_manager */
$geometry_data_manager = \Drupal::service('plugin.manager.geolocation.geometrydata');
return $geometry_data_manager
->executeGemeotryDataBatch($geometry_data_manager
->getGemeotryDataBatch('germany_zip_codes'));
}
/**
* Implements hook_uninstall().
*/
function geolocation_geometry_germany_zip_codes_uninstall() {
$taxonomy_storage = \Drupal::entityTypeManager()
->getStorage('taxonomy_term');
$taxonomy_storage
->delete($taxonomy_storage
->loadByProperties([
'vid' => 'germany_zip_codes',
]));
}
Functions
Name | Description |
---|---|
geolocation_geometry_germany_zip_codes_install | Implements hook_install(). |
geolocation_geometry_germany_zip_codes_uninstall | Implements hook_uninstall(). |