public function GeofieldProximityFilter::acceptExposedInput in Geofield 8
Do some minor translation of the exposed input
Overrides NumericFilter::acceptExposedInput
File
- src/
Plugin/ views/ filter/ GeofieldProximityFilter.php, line 509
Class
- GeofieldProximityFilter
- Field handler to filter Geofields by proximity.
Namespace
Drupal\geofield\Plugin\views\filterCode
public function acceptExposedInput($input) {
if (empty($this->options['exposed'])) {
return TRUE;
}
// Set the correct source configurations origin from exposed filter input
// coordinates.
$identifier = $this->options['expose']['identifier'];
if (!empty($input[$identifier]['source_configuration'])) {
foreach ($input[$identifier]['source_configuration'] as $k => $value) {
$this->options['source_configuration'][$k] = $input[$identifier]['source_configuration'][$k];
}
}
// The parent NumericFilter acceptExposedInput will care to correctly set
// the options value.
$rc = parent::acceptExposedInput($input);
return $rc;
}