function NumberWidget::settingsSummary
Same name in other branches
- 9 core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/NumberWidget.php \Drupal\Core\Field\Plugin\Field\FieldWidget\NumberWidget::settingsSummary()
- 8.9.x core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/NumberWidget.php \Drupal\Core\Field\Plugin\Field\FieldWidget\NumberWidget::settingsSummary()
- 10 core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/NumberWidget.php \Drupal\Core\Field\Plugin\Field\FieldWidget\NumberWidget::settingsSummary()
Overrides WidgetBase::settingsSummary
File
-
core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldWidget/ NumberWidget.php, line 52
Class
- NumberWidget
- Plugin implementation of the 'number' widget.
Namespace
Drupal\Core\Field\Plugin\Field\FieldWidgetCode
public function settingsSummary() {
$summary = [];
$placeholder = $this->getSetting('placeholder');
if (!empty($placeholder)) {
$summary[] = $this->t('Placeholder: @placeholder', [
'@placeholder' => $placeholder,
]);
}
else {
$summary[] = $this->t('No placeholder');
}
return $summary;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.