You are here

function Numeric::operators in EntityFieldQuery Views Backend 8

We don't support every operator from the parent class ("not between", for example), hence the need to define only the operators we do support.

Overrides Numeric::operators

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

File

src/Plugin/views/filter/Numeric.inc, line 25
Contains \Drupal\efq_views\Plugin\views\filter\Numeric.

Class

Numeric
Numeric filter.

Namespace

Drupal\efq_views\Plugin\views\filter

Code

function operators() {
  $operators = array(
    '<' => array(
      'title' => t('Is less than'),
      'method' => 'op_simple',
      'short' => t('<'),
      'values' => 1,
    ),
    '<=' => array(
      'title' => t('Is less than or equal to'),
      'method' => 'op_simple',
      'short' => t('<='),
      'values' => 1,
    ),
    '=' => array(
      'title' => t('Is equal to'),
      'method' => 'op_simple',
      'short' => t('='),
      'values' => 1,
    ),
    '<>' => array(
      'title' => t('Is not equal to'),
      'method' => 'op_simple',
      'short' => t('!='),
      'values' => 1,
    ),
    '>=' => array(
      'title' => t('Is greater than or equal to'),
      'method' => 'op_simple',
      'short' => t('>='),
      'values' => 1,
    ),
    '>' => array(
      'title' => t('Is greater than'),
      'method' => 'op_simple',
      'short' => t('>'),
      'values' => 1,
    ),
    'BETWEEN' => array(
      'title' => t('Is between'),
      'method' => 'op_between',
      'short' => t('between'),
      'values' => 2,
    ),
  );
  return $operators;
}