You are here

public static function DefaultValueTestForm::ajaxRefresh in Address 8

Ajax callback.

File

tests/modules/address_test/src/Form/DefaultValueTestForm.php, line 82

Class

DefaultValueTestForm
Used to test the address default value handling inside complex ajax forms.

Namespace

Drupal\address_test\Form

Code

public static function ajaxRefresh(array $form, FormStateInterface $form_state) {
  $parents = $form_state
    ->getTriggeringElement()['#parents'];
  array_pop($parents);
  return NestedArray::getValue($form, $parents);
}