Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x

Condition.php

Same filename in this branch
  1. 11.1.x core/lib/Drupal/Core/Config/Entity/Query/Condition.php
  2. 11.1.x core/lib/Drupal/Core/Condition/Annotation/Condition.php
  3. 11.1.x core/lib/Drupal/Core/Condition/Attribute/Condition.php
  4. 11.1.x core/lib/Drupal/Core/Entity/Query/Sql/pgsql/Condition.php
  5. 11.1.x core/lib/Drupal/Core/Entity/Query/Sql/Condition.php
  6. 11.1.x core/lib/Drupal/Core/Entity/KeyValueStore/Query/Condition.php
  7. 11.1.x core/lib/Drupal/Core/Database/Query/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.
RSS feed
Powered by Drupal