function WidgetBase::setWidgetState
Same name in other branches
- 9 core/lib/Drupal/Core/Field/WidgetBase.php \Drupal\Core\Field\WidgetBase::setWidgetState()
- 8.9.x core/lib/Drupal/Core/Field/WidgetBase.php \Drupal\Core\Field\WidgetBase::setWidgetState()
- 11.x core/lib/Drupal/Core/Field/WidgetBase.php \Drupal\Core\Field\WidgetBase::setWidgetState()
Overrides WidgetBaseInterface::setWidgetState
9 calls to WidgetBase::setWidgetState()
- FileWidget::extractFormValues in core/
modules/ file/ src/ Plugin/ Field/ FieldWidget/ FileWidget.php - FileWidget::submit in core/
modules/ file/ src/ Plugin/ Field/ FieldWidget/ FileWidget.php - Form submission handler for upload/remove button of formElement().
- MediaLibraryWidget::extractFormValues in core/
modules/ media_library/ src/ Plugin/ Field/ FieldWidget/ MediaLibraryWidget.php - MediaLibraryWidget::setFieldState in core/
modules/ media_library/ src/ Plugin/ Field/ FieldWidget/ MediaLibraryWidget.php - Sets the field state for the widget.
- WidgetBase::addMoreSubmit in core/
lib/ Drupal/ Core/ Field/ WidgetBase.php - Submission handler for the "Add another item" button.
File
-
core/
lib/ Drupal/ Core/ Field/ WidgetBase.php, line 607
Class
- WidgetBase
- Base class for 'Field widget' plugin implementations.
Namespace
Drupal\Core\FieldCode
public static function setWidgetState(array $parents, $field_name, FormStateInterface $form_state, array $field_state) {
NestedArray::setValue($form_state->getStorage(), static::getWidgetStateParents($parents, $field_name), $field_state);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.