You are here

public static function ShipmentForm::ajaxRefresh in Commerce Shipping 8.2

Ajax callback.

File

src/Form/ShipmentForm.php, line 207

Class

ShipmentForm
Defines the shipment add/edit form.

Namespace

Drupal\commerce_shipping\Form

Code

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