protected function OptionsButtonsWidget::getEmptyLabel in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsButtonsWidget.php \Drupal\Core\Field\Plugin\Field\FieldWidget\OptionsButtonsWidget::getEmptyLabel()
- 10 core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsButtonsWidget.php \Drupal\Core\Field\Plugin\Field\FieldWidget\OptionsButtonsWidget::getEmptyLabel()
Returns the empty option label to add to the list of options, if any.
Return value
string|null Either a label of the empty option, or NULL.
Overrides OptionsWidgetBase::getEmptyLabel
File
- core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldWidget/ OptionsButtonsWidget.php, line 65
Class
- OptionsButtonsWidget
- Plugin implementation of the 'options_buttons' widget.
Namespace
Drupal\Core\Field\Plugin\Field\FieldWidgetCode
protected function getEmptyLabel() {
if (!$this->required && !$this->multiple) {
return t('N/A');
}
}