public static function LeafletMap::optionsFormEntitySourceSubmitAjax in Leaflet 8
Same name and namespace in other branches
- 2.1.x modules/leaflet_views/src/Plugin/views/style/LeafletMap.php \Drupal\leaflet_views\Plugin\views\style\LeafletMap::optionsFormEntitySourceSubmitAjax()
- 2.0.x modules/leaflet_views/src/Plugin/views/style/LeafletMap.php \Drupal\leaflet_views\Plugin\views\style\LeafletMap::optionsFormEntitySourceSubmitAjax()
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
- modules/
leaflet_views/ src/ Plugin/ views/ style/ LeafletMap.php, line 660
Class
- LeafletMap
- Style plugin to render a View output as a Leaflet map.
Namespace
Drupal\leaflet_views\Plugin\views\styleCode
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);
}