You are here

public function GeofieldProximityFilter::operators in Geofield 8

Overrides NumericFilter::operators

1 call to GeofieldProximityFilter::operators()
GeofieldProximityFilter::query in src/Plugin/views/filter/GeofieldProximityFilter.php
Add this filter to the query.

File

src/Plugin/views/filter/GeofieldProximityFilter.php, line 134

Class

GeofieldProximityFilter
Field handler to filter Geofields by proximity.

Namespace

Drupal\geofield\Plugin\views\filter

Code

public function operators() {
  $operators = [
    '<' => [
      'title' => $this
        ->t('Is less than'),
      'method' => 'opSimple',
      'short' => $this
        ->t('<'),
      'values' => 1,
    ],
    '<=' => [
      'title' => $this
        ->t('Is less than or equal to'),
      'method' => 'opSimple',
      'short' => $this
        ->t('<='),
      'values' => 1,
    ],
    '=' => [
      'title' => $this
        ->t('Is equal to'),
      'method' => 'opSimple',
      'short' => $this
        ->t('='),
      'values' => 1,
    ],
    '!=' => [
      'title' => $this
        ->t('Is not equal to'),
      'method' => 'opSimple',
      'short' => $this
        ->t('!='),
      'values' => 1,
    ],
    '>=' => [
      'title' => $this
        ->t('Is greater than or equal to'),
      'method' => 'opSimple',
      'short' => $this
        ->t('>='),
      'values' => 1,
    ],
    '>' => [
      'title' => $this
        ->t('Is greater than'),
      'method' => 'opSimple',
      'short' => $this
        ->t('>'),
      'values' => 1,
    ],
    'between' => [
      'title' => $this
        ->t('Is between'),
      'method' => 'opBetween',
      'short' => $this
        ->t('between'),
      'values' => 2,
    ],
    'not between' => [
      'title' => $this
        ->t('Is not between'),
      'method' => 'opBetween',
      'short' => $this
        ->t('not between'),
      'values' => 2,
    ],
  ];
  return $operators;
}