public function GeolocationMapWidgetBase::settingsSummary in Geolocation Field 8.3
Same name and namespace in other branches
- 8.2 src/Plugin/Field/FieldWidget/GeolocationMapWidgetBase.php \Drupal\geolocation\Plugin\Field\FieldWidget\GeolocationMapWidgetBase::settingsSummary()
Returns a short summary for the current widget settings.
If an empty result is returned, a UI can still be provided to display a settings form in case the widget has configurable settings.
Return value
array A short summary of the widget settings.
Overrides WidgetBase::settingsSummary
File
- src/
Plugin/ Field/ FieldWidget/ GeolocationMapWidgetBase.php, line 201
Class
- GeolocationMapWidgetBase
- Map widget base.
Namespace
Drupal\geolocation\Plugin\Field\FieldWidgetCode
public function settingsSummary() {
$summary = [];
$settings = $this
->getSettings();
if (!empty($settings['auto_client_location_marker'])) {
$summary[] = $this
->t('Will set client location marker automatically by default');
}
if (!empty($settings['allow_override_map_settings'])) {
$summary[] = $this
->t('Users will be allowed to override the map settings for each content.');
}
$map_provider_settings = empty($settings[static::$mapProviderSettingsFormId]) ? [] : $settings[static::$mapProviderSettingsFormId];
$summary = array_replace_recursive($summary, $this->mapProvider
->getSettingsSummary($map_provider_settings));
return $summary;
}