You are here

public function GoogleAnalyticsNumeric::operators in Google Analytics Reports 8.3

Provide list of operators.

Overrides GoogleAnalyticsBase::operators

2 calls to GoogleAnalyticsNumeric::operators()
GoogleAnalyticsNumeric::acceptExposedInput in src/Plugin/views/filter/GoogleAnalyticsNumeric.php
Do some minor translation of the exposed input.
GoogleAnalyticsNumeric::operatorValues in src/Plugin/views/filter/GoogleAnalyticsNumeric.php
Operator values.

File

src/Plugin/views/filter/GoogleAnalyticsNumeric.php, line 38

Class

GoogleAnalyticsNumeric
Simple filter to handle numerics for Google Analytics.

Namespace

Drupal\google_analytics_reports\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,
    ],
  ];
  return $operators;
}