public function GeolocationGeometryDataBase::import in Geolocation Field 8.3
Import batch callback.
Parameters
mixed $context: Batch context.
Return value
bool Batch return.
4 calls to GeolocationGeometryDataBase::import()
- CanadaProvinces::import in modules/
geolocation_geometry/ modules/ geolocation_geometry_open_canada_provinces/ src/ Plugin/ geolocation/ GeolocationGeometryData/ CanadaProvinces.php - Import batch callback.
- GermanyZipCodes::import in modules/
geolocation_geometry/ modules/ geolocation_geometry_germany_zip_codes/ src/ Plugin/ geolocation/ GeolocationGeometryData/ GermanyZipCodes.php - Import batch callback.
- NaturalEarthCountries::import in modules/
geolocation_geometry/ modules/ geolocation_geometry_natural_earth_countries/ src/ Plugin/ geolocation/ GeolocationGeometryData/ NaturalEarthCountries.php - Import batch callback.
- UsStates::import in modules/
geolocation_geometry/ modules/ geolocation_geometry_natural_earth_us_states/ src/ Plugin/ geolocation/ GeolocationGeometryData/ UsStates.php - Import batch callback.
5 methods override GeolocationGeometryDataBase::import()
- CanadaProvinces::import in modules/
geolocation_geometry/ modules/ geolocation_geometry_open_canada_provinces/ src/ Plugin/ geolocation/ GeolocationGeometryData/ CanadaProvinces.php - Import batch callback.
- GermanyZipCodes::import in modules/
geolocation_geometry/ modules/ geolocation_geometry_germany_zip_codes/ src/ Plugin/ geolocation/ GeolocationGeometryData/ GermanyZipCodes.php - Import batch callback.
- NaturalEarthCountries::import in modules/
geolocation_geometry/ modules/ geolocation_geometry_natural_earth_countries/ src/ Plugin/ geolocation/ GeolocationGeometryData/ NaturalEarthCountries.php - Import batch callback.
- UnescoWorldHeritage::import in modules/
geolocation_geometry/ modules/ geolocation_geometry_world_heritage/ src/ Plugin/ geolocation/ GeolocationGeometryData/ UnescoWorldHeritage.php - Import batch callback.
- UsStates::import in modules/
geolocation_geometry/ modules/ geolocation_geometry_natural_earth_us_states/ src/ Plugin/ geolocation/ GeolocationGeometryData/ UsStates.php - Import batch callback.
File
- modules/
geolocation_geometry/ modules/ geolocation_geometry_data/ src/ GeolocationGeometryDataBase.php, line 109
Class
- GeolocationGeometryDataBase
- Class GeolocationGeometryDataBase.
Namespace
Drupal\geolocation_geometry_dataCode
public function import(&$context) {
$logger = \Drupal::logger('geolocation_geometry_data');
if (empty($this->shapeFilename)) {
return FALSE;
}
try {
$this->shapeFile = new ShapefileReader(\Drupal::service('file_system')
->getTempDirectory() . '/' . $this->localDirectory . '/' . $this->shapeFilename);
} catch (ShapefileException $e) {
$logger
->warning($e
->getMessage());
return FALSE;
}
return TRUE;
}