You are here

public function GeocoderWidget::settingsSummary in Geocoder 8

Returns a short summary for the current widget settings.

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

Return value

array A short summary of the widget settings.

Overrides WidgetBase::settingsSummary

File

src/Plugin/Field/FieldWidget/GeocoderWidget.php, line 75
Contains \Drupal\geocoder\Plugin\Field\FieldWidget\GeocoderWidget.

Class

GeocoderWidget
Plugin implementation of the 'geocoder_default' widget.

Namespace

Drupal\geocoder\Plugin\Field\FieldWidget

Code

public function settingsSummary() {
  $summary = array();
  $summary[] = $this
    ->t('Destination Geofield: !destination', array(
    '!destination' => $this
      ->getSetting('destination_field'),
  ));
  $placeholder = $this
    ->getSetting('placeholder');
  if (!empty($placeholder)) {
    $summary[] = t('Placeholder: @placeholder', array(
      '@placeholder' => $placeholder,
    ));
  }
  return $summary;
}