You are here

public static function BaseSettings::ajaxRefresh in Charts 8.4

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

Ajax callback.

File

src/Element/BaseSettings.php, line 541

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));
}