Condition.php

Namespace

Drupal\Core\Entity\Query\Null

File

core/lib/Drupal/Core/Entity/Query/Null/Condition.php

View 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);
  }

}

Classes

Title Deprecated Summary
Condition Defines the condition class for the null entity query.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.