public function GeofieldProximitySort::validateOptionsForm in Geofield 8
Simple validate handler
Overrides SortPluginBase::validateOptionsForm
File
- src/
Plugin/ views/ sort/ GeofieldProximitySort.php, line 122
Class
- GeofieldProximitySort
- Field handler to sort Geofields by proximity.
Namespace
Drupal\geofield\Plugin\views\sortCode
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,
]));
}
}