protected function ProximityFilter::valueSubmit in Geolocation Field 8.2
Same name and namespace in other branches
- 8.3 src/Plugin/views/filter/ProximityFilter.php \Drupal\geolocation\Plugin\views\filter\ProximityFilter::valueSubmit()
Perform any necessary changes to the form values prior to storage. There is no need for this function to actually store the data.
Overrides FilterPluginBase::valueSubmit
File
- src/
Plugin/ views/ filter/ ProximityFilter.php, line 144
Class
- ProximityFilter
- Filter handler for search keywords.
Namespace
Drupal\geolocation\Plugin\views\filterCode
protected function valueSubmit($form, FormStateInterface $form_state) {
$value = $form_state
->getValue([
'options',
'value',
'value',
]);
$distance = self::convertDistance($value, $this->options['unit']);
$form_state
->setValue([
'options',
'value',
'value',
], $distance);
parent::valueSubmit($form, $form_state);
}