GeometryViewsBoundaryFilter.php in Geolocation Field 8.3
File
modules/geolocation_geometry/src/Plugin/geolocation/MapCenter/GeometryViewsBoundaryFilter.php
View source
<?php
namespace Drupal\geolocation_geometry\Plugin\geolocation\MapCenter;
use Drupal\geolocation\Plugin\geolocation\MapCenter\ViewsBoundaryFilter;
class GeometryViewsBoundaryFilter extends ViewsBoundaryFilter {
public function getAvailableMapCenterOptions($context) {
$options = [];
if ($displayHandler = self::getViewsDisplayHandler($context)) {
foreach ($displayHandler
->getHandlers('filter') as $filter_id => $filter) {
if ($filter
->getPluginId() === 'geolocation_geometry_filter_boundary') {
$options['boundary_filter_' . $filter_id] = $this
->t('Geo Boundary filter') . ' - ' . $filter
->adminLabel();
}
}
}
return $options;
}
}