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

Breadcrumb

  1. Drupal Core 11.1.x
  2. Condition.php

class Condition

Same name in this branch
  1. 11.1.x core/lib/Drupal/Core/Config/Entity/Query/Condition.php \Drupal\Core\Config\Entity\Query\Condition
  2. 11.1.x core/lib/Drupal/Core/Condition/Annotation/Condition.php \Drupal\Core\Condition\Annotation\Condition
  3. 11.1.x core/lib/Drupal/Core/Condition/Attribute/Condition.php \Drupal\Core\Condition\Attribute\Condition
  4. 11.1.x core/lib/Drupal/Core/Entity/Query/Sql/pgsql/Condition.php \Drupal\Core\Entity\Query\Sql\pgsql\Condition
  5. 11.1.x core/lib/Drupal/Core/Entity/Query/Sql/Condition.php \Drupal\Core\Entity\Query\Sql\Condition
  6. 11.1.x core/lib/Drupal/Core/Entity/KeyValueStore/Query/Condition.php \Drupal\Core\Entity\KeyValueStore\Query\Condition
  7. 11.1.x core/lib/Drupal/Core/Database/Query/Condition.php \Drupal\Core\Database\Query\Condition

Defines the condition class for the null entity query.

Hierarchy

  • class \Drupal\Core\Entity\Query\ConditionFundamentals
    • class \Drupal\Core\Entity\Query\ConditionBase extends \Drupal\Core\Entity\Query\ConditionFundamentals implements \Drupal\Core\Entity\Query\ConditionInterface
      • class \Drupal\Core\Entity\Query\Null\Condition extends \Drupal\Core\Entity\Query\ConditionBase

Expanded class hierarchy of Condition

5 string references to 'Condition'
ConditionAggregate::compile in core/lib/Drupal/Core/Entity/Query/Sql/ConditionAggregate.php
Compiles this conditional clause.
ConditionManager::getType in core/lib/Drupal/Core/Condition/ConditionManager.php
A string identifying the plugin type.
core.data_types.schema.yml in core/config/schema/core.data_types.schema.yml
core/config/schema/core.data_types.schema.yml
QueryBase::conditionGroupFactory in core/lib/Drupal/Core/Entity/Query/QueryBase.php
Creates an object holding a group of conditions.
XmlFileLoader::parseConfigs in vendor/symfony/routing/Loader/XmlFileLoader.php
Parses the config elements (default, requirement, option).

File

core/lib/Drupal/Core/Entity/Query/Null/Condition.php, line 10

Namespace

Drupal\Core\Entity\Query\Null
View source
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);
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title Overrides
Condition::compile public function Compiles this conditional clause. Overrides ConditionInterface::compile
Condition::exists public function Queries for the existence of a field. Overrides ConditionInterface::exists
Condition::notExists public function Queries for the nonexistence of a field. Overrides ConditionInterface::notExists
ConditionBase::condition public function Adds a condition. Overrides ConditionInterface::condition
ConditionFundamentals::$conditions protected property Array of conditions.
ConditionFundamentals::$conjunction protected property The conjunction of this condition group.
ConditionFundamentals::$namespaces protected property List of potential namespaces of the classes belonging to this condition.
ConditionFundamentals::$query protected property The query this condition belongs to. 1
ConditionFundamentals::conditions public function
ConditionFundamentals::count public function
ConditionFundamentals::getConjunction public function
ConditionFundamentals::__clone public function Implements the magic __clone function.
ConditionFundamentals::__construct public function Constructs a Condition object.
RSS feed
Powered by Drupal