You are here

protected function BooleanOperator::operators in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/views/src/Plugin/views/filter/BooleanOperator.php \Drupal\views\Plugin\views\filter\BooleanOperator::operators()

Returns an array of operator information.

Return value

array

2 calls to BooleanOperator::operators()
BooleanOperator::operatorOptions in core/modules/views/src/Plugin/views/filter/BooleanOperator.php
Provide a list of options for the default operator form. Should be overridden by classes that don't override operatorForm
BooleanOperator::query in core/modules/views/src/Plugin/views/filter/BooleanOperator.php
Add this filter to the query.

File

core/modules/views/src/Plugin/views/filter/BooleanOperator.php, line 60
Contains \Drupal\views\Plugin\views\filter\BooleanOperator.

Class

BooleanOperator
Simple filter to handle matching of boolean values

Namespace

Drupal\views\Plugin\views\filter

Code

protected function operators() {
  return array(
    '=' => array(
      'title' => $this
        ->t('Is equal to'),
      'method' => 'queryOpBoolean',
      'short' => $this
        ->t('='),
      'values' => 1,
    ),
    '!=' => array(
      'title' => $this
        ->t('Is not equal to'),
      'method' => 'queryOpBoolean',
      'short' => $this
        ->t('!='),
      'values' => 1,
    ),
  );
}