You are here

public function Connection::condition in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::condition()

Prepares and returns a CONDITION query object.

Parameters

string $conjunction: The operator to use to combine conditions: 'AND' or 'OR'.

Return value

\Drupal\Core\Database\Query\Condition A new Condition query object.

See also

\Drupal\Core\Database\Query\Condition

File

core/lib/Drupal/Core/Database/Connection.php, line 970

Class

Connection
Base Database API class.

Namespace

Drupal\Core\Database

Code

public function condition($conjunction) {
  $class = $this
    ->getDriverClass('Condition');
  return new $class($conjunction);
}