You are here

public function FileGeocodeFormatter::settingsSummary in Geocoder 8.2

Same name and namespace in other branches
  1. 8.3 modules/geocoder_field/src/Plugin/Field/FieldFormatter/FileGeocodeFormatter.php \Drupal\geocoder_field\Plugin\Field\FieldFormatter\FileGeocodeFormatter::settingsSummary()

Returns a short summary for the current formatter settings.

If an empty result is returned, a UI can still be provided to display a settings form in case the formatter has configurable settings.

Return value

string[] A short summary of the formatter settings.

Overrides GeocodeFormatterBase::settingsSummary

1 method overrides FileGeocodeFormatter::settingsSummary()
GeoPhpGeocodeFormatter::settingsSummary in modules/geocoder_geofield/src/Plugin/Field/FieldFormatter/GeoPhpGeocodeFormatter.php
Returns a short summary for the current formatter settings.

File

modules/geocoder_field/src/Plugin/Field/FieldFormatter/FileGeocodeFormatter.php, line 166

Class

FileGeocodeFormatter
Plugin implementation of the Geocode formatter for File and Image fields.

Namespace

Drupal\geocoder_field\Plugin\Field\FieldFormatter

Code

public function settingsSummary() {
  $summary = [];
  $dumper_plugins = $this->dumperPluginManager
    ->getPluginsAsOptions();
  $dumper_plugin = $this
    ->getSetting('dumper');
  $summary['intro'] = $this->pluginDefinition['description'];
  $summary['plugins'] = t('Geocoder plugin(s): @formatterPlugin', [
    '@formatterPlugin' => $this->formatterPlugin,
  ]);
  $summary['dumper'] = t('Output format: @format', [
    '@format' => !empty($dumper_plugin) ? $dumper_plugins[$dumper_plugin] : $this
      ->t('Not set'),
  ]);
  return $summary;
}