Version 1
[yaffs-website] / web / core / lib / Drupal / Core / Entity / Query / Null / Condition.php
diff --git a/web/core/lib/Drupal/Core/Entity/Query/Null/Condition.php b/web/core/lib/Drupal/Core/Entity/Query/Null/Condition.php
new file mode 100644 (file)
index 0000000..a742922
--- /dev/null
@@ -0,0 +1,32 @@
+<?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);
+  }
+
+}