You are here

public function Here::getSettingsSummary in Geolocation Field 8.2

Same name and namespace in other branches
  1. 8.3 modules/geolocation_here/src/Plugin/geolocation/MapProvider/Here.php \Drupal\geolocation_here\Plugin\geolocation\MapProvider\Here::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 MapProviderBase::getSettingsSummary

File

modules/geolocation_here/src/Plugin/geolocation/MapProvider/Here.php, line 47

Class

Here
Provides HERE Maps API.

Namespace

Drupal\geolocation_here\Plugin\geolocation\MapProvider

Code

public function getSettingsSummary(array $settings) {
  $settings = array_replace_recursive(self::getDefaultSettings(), $settings);
  $summary = parent::getSettingsSummary($settings);
  $summary[] = $this
    ->t('Zoom level: @zoom', [
    '@zoom' => $settings['zoom'],
  ]);
  $summary[] = $this
    ->t('Height: @height', [
    '@height' => $settings['height'],
  ]);
  $summary[] = $this
    ->t('Width: @width', [
    '@width' => $settings['width'],
  ]);
  return $summary;
}