public static function GeofieldMapLegend::mapLegendSelectionUpdate in Geofield Map 8.2
Ajax callback triggered by Geofield Map Legend Selection.
Parameters
array $form: The build form.
\Drupal\Core\Form\FormStateInterface $form_state: The form state.
Return value
\Drupal\Core\Ajax\AjaxResponse Ajax response with updated form element.
File
- src/
Plugin/ Block/ GeofieldMapLegend.php, line 415
Class
- GeofieldMapLegend
- Provides a custom Geofield Map Legend block.
Namespace
Drupal\geofield_map\Plugin\BlockCode
public static function mapLegendSelectionUpdate(array $form, FormStateInterface $form_state) {
$response = new AjaxResponse();
$response
->addCommand(new ReplaceCommand('#geofield-map-legend-settings-block-wrapper', $form['settings']));
return $response;
}