function QueryPluginBase::setGroupOperator

Same name in other branches
  1. 8.9.x core/modules/views/src/Plugin/views/query/QueryPluginBase.php \Drupal\views\Plugin\views\query\QueryPluginBase::setGroupOperator()
  2. 10 core/modules/views/src/Plugin/views/query/QueryPluginBase.php \Drupal\views\Plugin\views\query\QueryPluginBase::setGroupOperator()
  3. 11.x core/modules/views/src/Plugin/views/query/QueryPluginBase.php \Drupal\views\Plugin\views\query\QueryPluginBase::setGroupOperator()

Control how all WHERE and HAVING groups are put together.

Parameters

$type: Either 'AND' or 'OR'

File

core/modules/views/src/Plugin/views/query/QueryPluginBase.php, line 194

Class

QueryPluginBase
Base plugin class for Views queries.

Namespace

Drupal\views\Plugin\views\query

Code

public function setGroupOperator($type = 'AND') {
    $this->groupOperator = strtoupper($type);
}

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