You are here

protected function WidgetBase::isMultiple in Select (or other) 8

Same name and namespace in other branches
  1. 4.x src/Plugin/Field/FieldWidget/WidgetBase.php \Drupal\select_or_other\Plugin\Field\FieldWidget\WidgetBase::isMultiple()

Helper method to determine if the field supports multiple values.

Return value

bool Whether the field supports multiple values or not.

1 call to WidgetBase::isMultiple()
WidgetBase::formElement in src/Plugin/Field/FieldWidget/WidgetBase.php
Returns the form for a single field widget.

File

src/Plugin/Field/FieldWidget/WidgetBase.php, line 44

Class

WidgetBase
Base class for the 'select_or_other_*' widgets.

Namespace

Drupal\select_or_other\Plugin\Field\FieldWidget

Code

protected function isMultiple() {
  return $this->fieldDefinition
    ->getFieldStorageDefinition()
    ->isMultiple();
}