public function Condition::__construct in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Database/Query/Condition.php \Drupal\Core\Database\Query\Condition::__construct()
Constructs a Condition object.
Parameters
string $conjunction: The operator to use to combine conditions: 'AND' or 'OR'.
bool $trigger_deprecation: If TRUE then trigger the deprecation warning.
Deprecated
in drupal:9.1.0 and is removed from drupal:10.0.0. Creating an instance of this class is deprecated.
See also
https://www.drupal.org/node/3159568
File
- core/
lib/ Drupal/ Core/ Database/ Query/ Condition.php, line 89
Class
- Condition
- Generic class for a series of conditions in a query.
Namespace
Drupal\Core\Database\QueryCode
public function __construct($conjunction, $trigger_deprecation = TRUE) {
if ($trigger_deprecation) {
@trigger_error('Creating an instance of this class is deprecated in drupal:9.1.0 and is removed in drupal:10.0.0. Use Database::getConnection()->condition() instead. See https://www.drupal.org/node/3159568', E_USER_DEPRECATED);
}
$this->conditions['#conjunction'] = $conjunction;
}