public function Yandex::getSettingsSummary in Geolocation Field 8.2
Same name and namespace in other branches
- 8.3 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 47
Class
- Yandex
- Provides Yandex Maps API.
Namespace
Drupal\geolocation_yandex\Plugin\geolocation\MapProviderCode
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;
}