public static function GeofieldGoogleMapFormatter::iconImageModeUpdate in Geofield Map 8.2
Ajax callback triggered Icon Image Option 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/ Field/ FieldFormatter/ GeofieldGoogleMapFormatter.php, line 391
Class
- GeofieldGoogleMapFormatter
- Plugin implementation of the 'geofield_google_map' formatter.
Namespace
Drupal\geofield_map\Plugin\Field\FieldFormatterCode
public static function iconImageModeUpdate(array $form, FormStateInterface $form_state) {
$response = new AjaxResponse();
$geofield_id = $form_state
->getTemporaryValue('geofield_id');
$response
->addCommand(new ReplaceCommand('#map-marker-and-infowindow-wrapper', $form['fields'][$geofield_id]['plugin']['settings_edit_form']['settings']['map_marker_and_infowindow']));
return $response;
}