function OptionsWidgetBase::getEmptyLabel

Same name in other branches
  1. 9 core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php \Drupal\Core\Field\Plugin\Field\FieldWidget\OptionsWidgetBase::getEmptyLabel()
  2. 10 core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php \Drupal\Core\Field\Plugin\Field\FieldWidget\OptionsWidgetBase::getEmptyLabel()
  3. 11.x core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php \Drupal\Core\Field\Plugin\Field\FieldWidget\OptionsWidgetBase::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.

1 call to OptionsWidgetBase::getEmptyLabel()
OptionsWidgetBase::getOptions in core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php
Returns the array of options for the widget.
2 methods override OptionsWidgetBase::getEmptyLabel()
OptionsButtonsWidget::getEmptyLabel in core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsButtonsWidget.php
Returns the empty option label to add to the list of options, if any.
OptionsSelectWidget::getEmptyLabel in core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsSelectWidget.php
Returns the empty option label to add to the list of options, if any.

File

core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php, line 196

Class

OptionsWidgetBase
Base class for the 'options_*' widgets.

Namespace

Drupal\Core\Field\Plugin\Field\FieldWidget

Code

protected function getEmptyLabel() {
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.