public function SmartDateWidgetBase::settingsSummary in Smart Date 3.3.x
Same name and namespace in other branches
- 3.0.x src/Plugin/Field/FieldWidget/SmartDateWidgetBase.php \Drupal\smart_date\Plugin\Field\FieldWidget\SmartDateWidgetBase::settingsSummary()
- 3.1.x src/Plugin/Field/FieldWidget/SmartDateWidgetBase.php \Drupal\smart_date\Plugin\Field\FieldWidget\SmartDateWidgetBase::settingsSummary()
- 3.2.x src/Plugin/Field/FieldWidget/SmartDateWidgetBase.php \Drupal\smart_date\Plugin\Field\FieldWidget\SmartDateWidgetBase::settingsSummary()
- 3.4.x src/Plugin/Field/FieldWidget/SmartDateWidgetBase.php \Drupal\smart_date\Plugin\Field\FieldWidget\SmartDateWidgetBase::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 SmartDateWidgetBase::settingsSummary()
- SmartDateDefaultWidget::settingsSummary in src/
Plugin/ Field/ FieldWidget/ SmartDateDefaultWidget.php - Returns a short summary for the current widget settings.
2 methods override SmartDateWidgetBase::settingsSummary()
- SmartDateDatelistWidget::settingsSummary in src/
Plugin/ Field/ FieldWidget/ SmartDateDatelistWidget.php - Returns a short summary for the current widget settings.
- SmartDateDefaultWidget::settingsSummary in src/
Plugin/ Field/ FieldWidget/ SmartDateDefaultWidget.php - Returns a short summary for the current widget settings.
File
- src/
Plugin/ Field/ FieldWidget/ SmartDateWidgetBase.php, line 64
Class
- SmartDateWidgetBase
- Base class for the 'smartdate_*' widgets.
Namespace
Drupal\smart_date\Plugin\Field\FieldWidgetCode
public function settingsSummary() {
$summary = parent::settingsSummary();
$cardinality = $this->fieldDefinition
->getFieldStorageDefinition()
->getCardinality();
if ($cardinality != 1 && !$this
->getSetting('show_extra')) {
$summary[] = $this
->t('Suppress extra, empty widget.');
}
return $summary;
}