You are here

protected static function MultiValue::getElementStateParents in SAML Authentication 4.x

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

Returns the location of processing information within $form_state.

Parameters

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

string $element_name: The element name.

Return value

array The location of processing information within $form_state.

See also

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

2 calls to MultiValue::getElementStateParents()
MultiValue::getElementState in src/Element/MultiValue.php
Retrieves processing information about the element from $form_state.
MultiValue::setElementState in src/Element/MultiValue.php
Stores processing information about the element in $form_state.

File

src/Element/MultiValue.php, line 520

Class

MultiValue
Provides a multi-value form element.

Namespace

Drupal\samlauth\Element

Code

protected static function getElementStateParents(array $parents, string $element_name) : array {

  // phpcs:disable
  // Element processing data is placed at
  // $form_state->get(['multivalue_form_element_storage', '#parents', ...$parents..., '#elements', $element_name]),
  // to avoid clashes between field names and $parents parts.
  // phpcs:enable
  return array_merge([
    'multivalue_form_element_storage',
    '#parents',
  ], $parents, [
    '#elements',
    $element_name,
  ]);
}