protected function WidgetBase::isRequired in Select (or other) 8
Same name and namespace in other branches
- 4.x src/Plugin/Field/FieldWidget/WidgetBase.php \Drupal\select_or_other\Plugin\Field\FieldWidget\WidgetBase::isRequired()
Helper method to determine if the field is required.
Return value
bool Whether the field is required or not.
File
- src/
Plugin/ Field/ FieldWidget/ WidgetBase.php, line 54
Class
- WidgetBase
- Base class for the 'select_or_other_*' widgets.
Namespace
Drupal\select_or_other\Plugin\Field\FieldWidgetCode
protected function isRequired() {
return $this->fieldDefinition
->isRequired();
}