public function ProximityFilter::defaultExposeOptions in Geolocation Field 8
Provide default options for exposed filters.
Overrides NumericFilter::defaultExposeOptions
File
- src/
Plugin/ views/ filter/ ProximityFilter.php, line 97
Class
- ProximityFilter
- Filter handler for search keywords.
Namespace
Drupal\geolocation\Plugin\views\filterCode
public function defaultExposeOptions() {
parent::defaultExposeOptions();
$this->options['expose']['label'] = $this
->t('Distance in @units', [
'@units' => $this
->getProximityUnit() == 'km' ? 'kilometers' : 'miles',
]);
}