You are here

public static function MultiValue::setElementState in SAML Authentication 8.3

Same name and namespace in other branches
  1. 4.x src/Element/MultiValue.php \Drupal\samlauth\Element\MultiValue::setElementState()

Stores processing information about the element 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 element lives in the form.

string $element_name: The element name.

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

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

See also

\Drupal\Core\Field\WidgetBase::setWidgetState()

2 calls to MultiValue::setElementState()
MultiValue::addMoreSubmit in src/Element/MultiValue.php
Handles the "Add another item" button AJAX request.
MultiValue::processMultiValue in src/Element/MultiValue.php
Processes a multi-value form element.

File

src/Element/MultiValue.php, line 503

Class

MultiValue
Provides a multi-value form element.

Namespace

Drupal\samlauth\Element

Code

public static function setElementState(array $parents, string $element_name, FormStateInterface $form_state, array $field_state) : void {
  NestedArray::setValue($form_state
    ->getStorage(), static::getElementStateParents($parents, $element_name), $field_state);
}