public function FileGeocodeFormatter::getEnabledGeocoderProviders in Geocoder 8.3
Returns the Geocoder providers that are enabled in this formatter.
Return value
\Drupal\geocoder\Entity\GeocoderProvider[] The enabled Geocoder providers, sorted by weight.
Overrides GeocodeFormatterBase::getEnabledGeocoderProviders
2 calls to FileGeocodeFormatter::getEnabledGeocoderProviders()
- FileGeocodeFormatter::viewElements in modules/
geocoder_field/ src/ Plugin/ Field/ FieldFormatter/ FileGeocodeFormatter.php - Builds a renderable array for a field value.
- GeoPhpGeocodeFormatter::viewElements in modules/
geocoder_geofield/ src/ Plugin/ Field/ FieldFormatter/ GeoPhpGeocodeFormatter.php - Builds a renderable array for a field value.
File
- modules/
geocoder_field/ src/ Plugin/ Field/ FieldFormatter/ FileGeocodeFormatter.php, line 223
Class
- FileGeocodeFormatter
- Plugin implementation of the Geocode formatter for File and Image fields.
Namespace
Drupal\geocoder_field\Plugin\Field\FieldFormatterCode
public function getEnabledGeocoderProviders() : array {
$providers = array_filter(parent::getEnabledGeocoderProviders(), function (GeocoderProvider $geocoder_provider) {
/* @var \Drupal\Component\Plugin\PluginBase $plugin */
$plugin = $geocoder_provider
->getPlugin();
return $plugin
->getPluginId() == $this->formatterPlugin;
});
return $providers;
}