You are here

public static function GeofieldGoogleMapViewStyle::optionsFormEntitySourceSubmitAjax in Geofield Map 8.2

Ajax callback to reload the options form after data source change.

This allows the entityType (which can be affected by which source is selected to alter the form.

Parameters

array $form: The Form.

\Drupal\Core\Form\FormStateInterface $form_state: The Form state.

Return value

mixed The returned result.

File

src/Plugin/views/style/GeofieldGoogleMapViewStyle.php, line 771

Class

GeofieldGoogleMapViewStyle
Style plugin to render a View output as a Leaflet map.

Namespace

Drupal\geofield_map\Plugin\views\style

Code

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