function OptionsButtonsWidget::getEmptyLabel

Same name in other branches
  1. 9 core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsButtonsWidget.php \Drupal\Core\Field\Plugin\Field\FieldWidget\OptionsButtonsWidget::getEmptyLabel()
  2. 8.9.x core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsButtonsWidget.php \Drupal\Core\Field\Plugin\Field\FieldWidget\OptionsButtonsWidget::getEmptyLabel()
  3. 10 core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsButtonsWidget.php \Drupal\Core\Field\Plugin\Field\FieldWidget\OptionsButtonsWidget::getEmptyLabel()

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\FieldWidget

Code

protected function getEmptyLabel() {
    if (!$this->required && !$this->multiple) {
        return $this->t('N/A');
    }
}

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