You are here

public function GeocoderManager::getLocationCapableGeocoders in Geolocation Field 8

Get location capable geocoder definitions.

Return value

array List of location capable geocoder definitions.

File

src/GeocoderManager.php, line 67

Class

GeocoderManager
Search plugin manager.

Namespace

Drupal\geolocation

Code

public function getLocationCapableGeocoders() {
  $location_capable_geocoders = [];
  foreach ($this
    ->getDefinitions() as $id => $definition) {
    if (!empty($definition['locationCapable'])) {
      $location_capable_geocoders[$id] = $definition;
    }
  }
  return $location_capable_geocoders;
}