Condition.php in Drupal 8
Same filename in this branch
- 8 core/lib/Drupal/Core/Condition/Annotation/Condition.php
- 8 core/lib/Drupal/Core/Database/Query/Condition.php
- 8 core/lib/Drupal/Core/Config/Entity/Query/Condition.php
- 8 core/lib/Drupal/Core/Entity/KeyValueStore/Query/Condition.php
- 8 core/lib/Drupal/Core/Entity/Query/Sql/Condition.php
- 8 core/lib/Drupal/Core/Entity/Query/Null/Condition.php
- 8 core/lib/Drupal/Core/Entity/Query/Sql/pgsql/Condition.php
Same filename and directory in other branches
Namespace
Drupal\Core\Entity\Query\NullFile
core/lib/Drupal/Core/Entity/Query/Null/Condition.phpView source
<?php
namespace Drupal\Core\Entity\Query\Null;
use Drupal\Core\Entity\Query\ConditionBase;
/**
* Defines the condition class for the null entity query.
*/
class Condition extends ConditionBase {
/**
* {@inheritdoc}
*/
public function compile($query) {
}
/**
* {@inheritdoc}
*/
public function exists($field, $langcode = NULL) {
return $this
->condition($field, NULL, 'IS NOT NULL', $langcode);
}
/**
* {@inheritdoc}
*/
public function notExists($field, $langcode = NULL) {
return $this
->condition($field, NULL, 'IS NULL', $langcode);
}
}