You are here

protected function ConfigEntityQuery::getConditionGroup in Configuration Views 8

Same name and namespace in other branches
  1. 2.0.x src/Plugin/views/query/ConfigEntityQuery.php \Drupal\config_views\Plugin\views\query\ConfigEntityQuery::getConditionGroup()

Returns a condition group.

1 call to ConfigEntityQuery::getConditionGroup()
ConfigEntityQuery::buildConditions in src/Plugin/views/query/ConfigEntityQuery.php
Build conditions based on it's groups.

File

src/Plugin/views/query/ConfigEntityQuery.php, line 150

Class

ConfigEntityQuery
This query is able to work with config entities.

Namespace

Drupal\config_views\Plugin\views\query

Code

protected function getConditionGroup($group) {
  if (!isset($this->entityConditionGroups[$group])) {
    $query = $this->entityConditionGroups[0];
    $condition = isset($this->where[$group]) && $this->where[$group]['type'] == 'OR' ? $query
      ->orConditionGroup() : $query
      ->andConditionGroup();
    $query
      ->condition($condition);
    $this->entityConditionGroups[$group] = $condition;
  }
  return $this->entityConditionGroups[$group];
}