public function SmartDateDefaultWidget::settingsSummary in Smart Date 3.x
Same name and namespace in other branches
- 8.2 src/Plugin/Field/FieldWidget/SmartDateDefaultWidget.php \Drupal\smart_date\Plugin\Field\FieldWidget\SmartDateDefaultWidget::settingsSummary()
- 3.0.x src/Plugin/Field/FieldWidget/SmartDateDefaultWidget.php \Drupal\smart_date\Plugin\Field\FieldWidget\SmartDateDefaultWidget::settingsSummary()
- 3.1.x src/Plugin/Field/FieldWidget/SmartDateDefaultWidget.php \Drupal\smart_date\Plugin\Field\FieldWidget\SmartDateDefaultWidget::settingsSummary()
- 3.2.x src/Plugin/Field/FieldWidget/SmartDateDefaultWidget.php \Drupal\smart_date\Plugin\Field\FieldWidget\SmartDateDefaultWidget::settingsSummary()
- 3.3.x src/Plugin/Field/FieldWidget/SmartDateDefaultWidget.php \Drupal\smart_date\Plugin\Field\FieldWidget\SmartDateDefaultWidget::settingsSummary()
- 3.4.x src/Plugin/Field/FieldWidget/SmartDateDefaultWidget.php \Drupal\smart_date\Plugin\Field\FieldWidget\SmartDateDefaultWidget::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
1 call to SmartDateDefaultWidget::settingsSummary()
- SmartDateTimezoneWidget::settingsSummary in src/
Plugin/ Field/ FieldWidget/ SmartDateTimezoneWidget.php - Returns a short summary for the current widget settings.
1 method overrides SmartDateDefaultWidget::settingsSummary()
- SmartDateTimezoneWidget::settingsSummary in src/
Plugin/ Field/ FieldWidget/ SmartDateTimezoneWidget.php - Returns a short summary for the current widget settings.
File
- src/
Plugin/ Field/ FieldWidget/ SmartDateDefaultWidget.php, line 92
Class
- SmartDateDefaultWidget
- Plugin implementation of the 'smartdate_default' widget.
Namespace
Drupal\smart_date\Plugin\Field\FieldWidgetCode
public function settingsSummary() {
$summary = parent::settingsSummary();
if ($this
->getSetting('modal')) {
$summary[] = $this
->t('Use modal for managing instances');
}
if ($this->fieldDefinition
->getType() == 'daterange' && $this
->getSetting('default_duration')) {
$summary[] = $this
->t('The default duration is @def_dur minutes.', [
'@def_dur' => $this
->getSetting('default_duration'),
]);
}
return $summary;
}