Condition.php 590 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace Drupal\Core\Entity\Query\Null;
  3. use Drupal\Core\Entity\Query\ConditionBase;
  4. /**
  5. * Defines the condition class for the null entity query.
  6. */
  7. class Condition extends ConditionBase {
  8. /**
  9. * {@inheritdoc}
  10. */
  11. public function compile($query) {
  12. }
  13. /**
  14. * {@inheritdoc}
  15. */
  16. public function exists($field, $langcode = NULL) {
  17. return $this->condition($field, NULL, 'IS NOT NULL', $langcode);
  18. }
  19. /**
  20. * {@inheritdoc}
  21. */
  22. public function notExists($field, $langcode = NULL) {
  23. return $this->condition($field, NULL, 'IS NULL', $langcode);
  24. }
  25. }