geolocation_geometry_natural_earth_countries.install in Geolocation Field 8.3
Geolocation Geometry country import.
File
modules/geolocation_geometry/modules/geolocation_geometry_natural_earth_countries/geolocation_geometry_natural_earth_countries.installView source
<?php
/**
* @file
* Geolocation Geometry country import.
*/
/**
* Implements hook_install().
*/
function geolocation_geometry_natural_earth_countries_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('natural_earth_countries'));
}
/**
* Implements hook_uninstall().
*/
function geolocation_geometry_natural_earth_countries_uninstall() {
$taxonomy_storage = \Drupal::entityTypeManager()
->getStorage('taxonomy_term');
$taxonomy_storage
->delete($taxonomy_storage
->loadByProperties([
'vid' => 'geolocation_geometry_countries',
]));
}
Functions
Name | Description |
---|---|
geolocation_geometry_natural_earth_countries_install | Implements hook_install(). |
geolocation_geometry_natural_earth_countries_uninstall | Implements hook_uninstall(). |