function Query::condition

Same name in other branches
  1. 9 core/lib/Drupal/Core/Config/Entity/Query/Query.php \Drupal\Core\Config\Entity\Query\Query::condition()
  2. 8.9.x core/lib/Drupal/Core/Config/Entity/Query/Query.php \Drupal\Core\Config\Entity\Query\Query::condition()
  3. 11.x core/lib/Drupal/Core/Config/Entity/Query/Query.php \Drupal\Core\Config\Entity\Query\Query::condition()

Overrides \Drupal\Core\Entity\Query\QueryBase::condition().

Additional to the syntax defined in the QueryInterface you can use placeholders (*) to match all keys of a subarray. Let's take the follow yaml file as example:


 level1:
   level2a:
     level3: 1
   level2b:
     level3: 2

Then you can filter out via $query->condition('level1.*.level3', 1).

Overrides QueryBase::condition

File

core/lib/Drupal/Core/Config/Entity/Query/Query.php, line 73

Class

Query
Defines the entity query for configuration entities.

Namespace

Drupal\Core\Config\Entity\Query

Code

public function condition($property, $value = NULL, $operator = NULL, $langcode = NULL) {
    return parent::condition($property, $value, $operator, $langcode);
}

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