You are here

public static function BaseSettings::ajaxRefresh in Charts 5.0.x

Same name and namespace in other branches
  1. 8.4 src/Element/BaseSettings.php \Drupal\charts\Element\BaseSettings::ajaxRefresh()

Ajax callback.

File

src/Element/BaseSettings.php, line 543

Class

BaseSettings
Provides a form element for setting a chart.

Namespace

Drupal\charts\Element

Code

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