You are here

public function Yandex::getSettingsSummary in Geolocation Field 8.3

Same name and namespace in other branches
  1. 8.2 modules/geolocation_yandex/src/Plugin/geolocation/MapProvider/Yandex.php \Drupal\geolocation_yandex\Plugin\geolocation\MapProvider\Yandex::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_yandex/src/Plugin/geolocation/MapProvider/Yandex.php, line 54

Class

Yandex
Provides Yandex Maps API.

Namespace

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