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

Breadcrumb

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

function WidgetBaseInterface::setWidgetState

Stores processing information about the widget in $form_state.

This method is static so that it can be used in static Form API #callbacks.

Parameters

array $parents: The array of #parents where the widget lives in the form.

string $field_name: The field name.

\Drupal\Core\Form\FormStateInterface $form_state: The form state.

array $field_state: The array of data to store. See getWidgetState() for the structure and content of the array.

1 method overrides WidgetBaseInterface::setWidgetState()
WidgetBase::setWidgetState in core/lib/Drupal/Core/Field/WidgetBase.php
Stores processing information about the widget in $form_state.

File

core/lib/Drupal/Core/Field/WidgetBaseInterface.php, line 105

Class

WidgetBaseInterface
Base interface definition for "Field widget" plugins.

Namespace

Drupal\Core\Field

Code

public static function setWidgetState(array $parents, $field_name, FormStateInterface $form_state, array $field_state);

API Navigation

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