You are here

public function GeolocationShapes::getSettingsSummary in Geolocation Field 8.3

Provide a summary array to use in field formatters.

Parameters

array $settings: The current map settings.

Return value

array An array to use as field formatter summary.

Overrides MapFeatureBase::getSettingsSummary

File

src/Plugin/geolocation/MapFeature/GeolocationShapes.php, line 40

Class

GeolocationShapes
Redraw locations as shapes.

Namespace

Drupal\geolocation\Plugin\geolocation\MapFeature

Code

public function getSettingsSummary(array $settings) {
  $summary = parent::getSettingsSummary($settings);
  $summary[] = $this
    ->t('Draw polyline: @polyline', [
    '@polyline' => $settings['polyline'] ? $this
      ->t('Yes') : $this
      ->t('No'),
  ]);
  $summary[] = $this
    ->t('Draw polygon: @polygon', [
    '@polygon' => $settings['polygon'] ? $this
      ->t('Yes') : $this
      ->t('No'),
  ]);
  return $summary;
}