public static function OriginFromProximityFilter::sourceProximityFilterUpdate in Geofield 8
Ajax callback triggered on Proximity Filter 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/ GeofieldProximitySource/ OriginFromProximityFilter.php, line 143
Class
- OriginFromProximityFilter
- Defines 'Geofield Custom Origin' plugin.
Namespace
Drupal\geofield\Plugin\GeofieldProximitySourceCode
public static function sourceProximityFilterUpdate(array $form, FormStateInterface $form_state) {
$response = new AjaxResponse();
$response
->addCommand(new ReplaceCommand('#proximity-source-configuration', $form['options']['source_configuration']));
return $response;
}