public function OpenlayersGeofieldWidget::settingsSummary in Openlayers 8.4
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
- modules/
openlayers_geofield/ src/ Plugin/ Field/ FieldWidget/ OpenlayersGeofieldWidget.php, line 94
Class
- OpenlayersGeofieldWidget
- Plugin implementation of an Openlayers widget.
Namespace
Drupal\openlayers\Plugin\Field\FieldWidgetCode
public function settingsSummary() {
$summary = [];
$map_label = \Drupal::config('openlayers.map.' . $this
->getSetting('map'))
->get('label');
$summary[] = $this
->t('Openlayers map: @map', [
'@map' => $map_label,
]);
$summary[] = $this
->t('Map height: @height @height_unit', [
'@height' => $this
->getSetting('height'),
'@height_unit' => $this
->getSetting('height_unit'),
]);
return $summary;
}