public function GeofieldProximityFilter::validateOptionsForm in Geofield 8
Simple validate handler
Overrides FilterPluginBase::validateOptionsForm
File
- src/
Plugin/ views/ filter/ GeofieldProximityFilter.php, line 296
Class
- GeofieldProximityFilter
- Field handler to filter Geofields by proximity.
Namespace
Drupal\geofield\Plugin\views\filterCode
public function validateOptionsForm(&$form, FormStateInterface $form_state) {
parent::validateOptionsForm($form, $form_state);
try {
$this->sourcePlugin
->validateOptionsForm($form['source_configuration'], $form_state, [
'source_configuration',
]);
} catch (\Exception $e) {
watchdog_exception('geofield', $e);
$form_state
->setErrorByName($form['source'], $this
->t("The Proximity Source couldn't be set due to: @error", [
'@error' => $e,
]));
}
}