You are here

public function Drawing::getSettingsSummary in Geolocation Field 8.3

Same name and namespace in other branches
  1. 8.2 modules/geolocation_google_maps/src/Plugin/geolocation/MapFeature/Drawing.php \Drupal\geolocation_google_maps\Plugin\geolocation\MapFeature\Drawing::getSettingsSummary()

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

modules/geolocation_google_maps/src/Plugin/geolocation/MapFeature/Drawing.php, line 39

Class

Drawing
Provides Drawing.

Namespace

Drupal\geolocation_google_maps\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;
}