function BooleanOperator::init

Same name and namespace in other branches
  1. 9 core/modules/views/src/Plugin/views/filter/BooleanOperator.php \Drupal\views\Plugin\views\filter\BooleanOperator::init()
  2. 10 core/modules/views/src/Plugin/views/filter/BooleanOperator.php \Drupal\views\Plugin\views\filter\BooleanOperator::init()
  3. 11.x core/modules/views/src/Plugin/views/filter/BooleanOperator.php \Drupal\views\Plugin\views\filter\BooleanOperator::init()

Overrides FilterPluginBase::init

1 call to BooleanOperator::init()
Current::init in core/modules/user/src/Plugin/views/filter/Current.php
Overrides \Drupal\views\Plugin\views\HandlerBase::init().
1 method overrides BooleanOperator::init()
Current::init in core/modules/user/src/Plugin/views/filter/Current.php
Overrides \Drupal\views\Plugin\views\HandlerBase::init().

File

core/modules/views/src/Plugin/views/filter/BooleanOperator.php, line 88

Class

BooleanOperator
Simple filter to handle matching of boolean values

Namespace

Drupal\views\Plugin\views\filter

Code

public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) {
    parent::init($view, $display, $options);
    $this->value_value = $this->t('True');
    if (isset($this->definition['label'])) {
        $this->value_value = $this->definition['label'];
    }
    elseif (isset($this->definition['title'])) {
        $this->value_value = $this->definition['title'];
    }
    if (isset($this->definition['accept null'])) {
        $this->accept_null = (bool) $this->definition['accept null'];
    }
    elseif (isset($this->definition['accept_null'])) {
        $this->accept_null = (bool) $this->definition['accept_null'];
    }
    $this->valueOptions = NULL;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.