GeometryViewsProximityFilter.php in Geolocation Field 8.3
File
modules/geolocation_geometry/src/Plugin/geolocation/Location/GeometryViewsProximityFilter.php
View source
<?php
namespace Drupal\geolocation_geometry\Plugin\geolocation\Location;
use Drupal\geolocation\Plugin\geolocation\Location\ViewsProximityFilter;
class GeometryViewsProximityFilter extends ViewsProximityFilter {
public function getAvailableLocationOptions($context) {
$options = [];
if ($displayHandler = self::getViewsDisplayHandler($context)) {
foreach ($displayHandler
->getHandlers('filter') as $delta => $filter) {
if ($filter
->getPluginId() === 'geolocation_geometry_filter_proximity' && $filter !== $context) {
$options[$delta] = $this
->t('Geo Proximity filter') . ' - ' . $filter
->adminLabel();
}
}
}
return $options;
}
}