Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. WidgetBase.php

function WidgetBase::setWidgetState

Overrides WidgetBaseInterface::setWidgetState

9 calls to WidgetBase::setWidgetState()
FileWidget::extractFormValues in core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php
Extracts field values from submitted form values.
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
Extracts field values from submitted form values.
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.

... See full list

File

core/lib/Drupal/Core/Field/WidgetBase.php, line 604

Class

WidgetBase
Base class for 'Field widget' plugin implementations.

Namespace

Drupal\Core\Field

Code

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);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal