diff --git a/core/lib/Drupal/Core/Field/WidgetBase.php b/core/lib/Drupal/Core/Field/WidgetBase.php index aa285e2..44fe57a 100644 --- a/core/lib/Drupal/Core/Field/WidgetBase.php +++ b/core/lib/Drupal/Core/Field/WidgetBase.php @@ -106,8 +106,8 @@ public function form(FieldItemListInterface $items, array &$form, FormStateInter $elements = $this->formMultipleElements($items, $form, $form_state); } - // Populate the 'array_parents' information in $form_state['field'] after - // the form is built, so that we catch changes in the form structure + // Populate the 'array_parents' information in $form_state->get('field') + // after the form is built, so that we catch changes in the form structure // performed in alter() hooks. $elements['#after_build'][] = array(get_class($this), 'afterBuild'); $elements['#field_name'] = $field_name; @@ -461,7 +461,7 @@ public static function setWidgetState(array $parents, $field_name, FormStateInte */ protected static function getWidgetStateParents(array $parents, $field_name) { // Field processing data is placed at - // $form_state['field']['#parents'][...$parents...]['#fields'][$field_name], + // $form_state->get(['field', '#parents', ...$parents..., '#fields', $field_name]), // to avoid clashes between field names and $parents parts. return array_merge(array('field', '#parents'), $parents, array('#fields', $field_name)); }