public function HMSFieldWidget::settingsSummary in HMS Field 8
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/ HMSFieldWidget.php, line 93 - Contains \Drupal\hms_field\Plugin\Field\FieldWidget\HMSFieldWidget.
Class
- HMSFieldWidget
- Plugin implementation of the 'hms_default' widget.
Namespace
Drupal\hms_field\Plugin\Field\FieldWidgetCode
public function settingsSummary() {
$summary = array();
$summary[] = t('Format: @format', array(
'@format' => $this
->getSetting('format'),
));
$summary[] = t('Placeholder: @value', array(
'@value' => $this
->getSetting('default_placeholder') ? $this
->getSetting('format') : $this
->getSetting('placeholder'),
));
return $summary;
}