You are here

protected function OriginFromProximityFilter::getAvailableProximityFilters in Geofield 8

Returns the list of available proximity filters.

Return value

array The list of available proximity filters

1 call to OriginFromProximityFilter::getAvailableProximityFilters()
OriginFromProximityFilter::buildOptionsForm in src/Plugin/GeofieldProximitySource/OriginFromProximityFilter.php
Builds the specific form elements for the geofield proximity plugin.

File

src/Plugin/GeofieldProximitySource/OriginFromProximityFilter.php, line 73

Class

OriginFromProximityFilter
Defines 'Geofield Custom Origin' plugin.

Namespace

Drupal\geofield\Plugin\GeofieldProximitySource

Code

protected function getAvailableProximityFilters() {
  $proximity_filters = [];

  /** @var \Drupal\views\Plugin\views\filter\FilterPluginBase $filter */
  foreach ($this->viewHandler->displayHandler
    ->getHandlers('filter') as $delta => $filter) {
    if ($filter->pluginId === 'geofield_proximity_filter') {
      $proximity_filters[$delta] = $filter
        ->adminLabel();
    }
  }
  return $proximity_filters;
}