function WidgetBase::isDefaultValueWidget
Same name in other branches
- 9 core/lib/Drupal/Core/Field/WidgetBase.php \Drupal\Core\Field\WidgetBase::isDefaultValueWidget()
- 8.9.x core/lib/Drupal/Core/Field/WidgetBase.php \Drupal\Core\Field\WidgetBase::isDefaultValueWidget()
- 11.x core/lib/Drupal/Core/Field/WidgetBase.php \Drupal\Core\Field\WidgetBase::isDefaultValueWidget()
Returns whether the widget used for default value form.
Parameters
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
bool TRUE if a widget used to input default value, FALSE otherwise.
6 calls to WidgetBase::isDefaultValueWidget()
- CommentWidget::formElement in core/
modules/ comment/ src/ Plugin/ Field/ FieldWidget/ CommentWidget.php - Returns the form for a single field widget.
- LinkWidget::formElement in core/
modules/ link/ src/ Plugin/ Field/ FieldWidget/ LinkWidget.php - Returns the form for a single field widget.
- TextareaWidget::formElement in core/
modules/ text/ src/ Plugin/ Field/ FieldWidget/ TextareaWidget.php - Returns the form for a single field widget.
- TextfieldWidget::formElement in core/
modules/ text/ src/ Plugin/ Field/ FieldWidget/ TextfieldWidget.php - Returns the form for a single field widget.
- WidgetBase::form in core/
lib/ Drupal/ Core/ Field/ WidgetBase.php - Creates a form element for a field.
File
-
core/
lib/ Drupal/ Core/ Field/ WidgetBase.php, line 709
Class
- WidgetBase
- Base class for 'Field widget' plugin implementations.
Namespace
Drupal\Core\FieldCode
protected function isDefaultValueWidget(FormStateInterface $form_state) {
return (bool) $form_state->get('default_value_widget');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.