public function ConditionInterface::conditions

Same name in this branch
  1. 9.x drupal/core/lib/Drupal/Core/Entity/Query/ConditionInterface.php \Drupal\Core\Entity\Query\ConditionInterface::conditions()
  2. 9.x drupal/core/lib/Drupal/Core/Database/Query/ConditionInterface.php \Drupal\Core\Database\Query\ConditionInterface::conditions()

Gets a complete list of all conditions in this conditional clause.

This method returns by reference. That allows alter hooks to access the data structure directly and manipulate it before it gets compiled.

The data structure that is returned is an indexed array of entries, where each entry looks like the following:

array(
  'field' => $field,
  'value' => $value,
  'operator' => $operator,
);

In the special case that $operator is NULL, the $field is taken as a raw SQL snippet (possibly containing a function) and $value is an associative array of placeholders for the snippet.

There will also be a single array entry of #conjunction, which is the conjunction that will be applied to the array, such as AND.

6 methods override ConditionInterface::conditions()
Condition::conditions in drupal/core/lib/Drupal/Core/Database/Query/Condition.php
Implements Drupal\Core\Database\Query\ConditionInterface::conditions().
Delete::conditions in drupal/core/lib/Drupal/Core/Database/Query/Delete.php
Implements Drupal\Core\Database\Query\ConditionInterface::conditions().
Merge::conditions in drupal/core/lib/Drupal/Core/Database/Query/Merge.php
Implements Drupal\Core\Database\Query\ConditionInterface::conditions().
Select::conditions in drupal/core/lib/Drupal/Core/Database/Query/Select.php
Gets a complete list of all conditions in this conditional clause.
SelectExtender::conditions in drupal/core/lib/Drupal/Core/Database/Query/SelectExtender.php
Gets a complete list of all conditions in this conditional clause.

... See full list

File

drupal/core/lib/Drupal/Core/Database/Query/ConditionInterface.php, line 128
Definition of Drupal\Core\Database\Query\ConditionInterface

Class

ConditionInterface
Interface for a conditional clause in a query.

Namespace

Drupal\Core\Database\Query

Code

public function &conditions();