interface ConditionAggregateInterface

Same name in other branches
  1. 9 core/lib/Drupal/Core/Entity/Query/ConditionAggregateInterface.php \Drupal\Core\Entity\Query\ConditionAggregateInterface
  2. 8.9.x core/lib/Drupal/Core/Entity/Query/ConditionAggregateInterface.php \Drupal\Core\Entity\Query\ConditionAggregateInterface
  3. 10 core/lib/Drupal/Core/Entity/Query/ConditionAggregateInterface.php \Drupal\Core\Entity\Query\ConditionAggregateInterface

Defines aggregated entity query conditions.

Hierarchy

Expanded class hierarchy of ConditionAggregateInterface

All classes that implement ConditionAggregateInterface

1 file declares its use of ConditionAggregateInterface
ConditionAggregate.php in core/lib/Drupal/Core/Entity/Query/Sql/ConditionAggregate.php

File

core/lib/Drupal/Core/Entity/Query/ConditionAggregateInterface.php, line 8

Namespace

Drupal\Core\Entity\Query
View source
interface ConditionAggregateInterface extends \Countable {
    
    /**
     * Gets the current conjunction.
     *
     * @return string
     *   Can be AND or OR.
     */
    public function getConjunction();
    
    /**
     * Adds a condition.
     *
     * @param string|ConditionAggregateInterface $field
     *   The field.
     * @param string $function
     *   (optional) The function.
     * @param mixed $value
     *   (optional) The value.
     * @param string $operator
     *   (optional) The operator.
     * @param string $langcode
     *   (optional) For which language the entity should be prepared, defaults to
     *   the current content language.
     *
     * @return $this
     *   The called object.
     *
     * @see \Drupal\Core\Entity\Query\QueryInterface::condition()
     */
    public function condition($field, $function = NULL, $value = NULL, $operator = NULL, $langcode = NULL);
    
    /**
     * Queries for the existence of a field.
     *
     * @param string $field
     *   The field to query for existence.
     * @param string $function
     *   The function.
     * @param string $langcode
     *   (optional) For which language the entity should be prepared, defaults to
     *   the current content language.
     *
     * @return \Drupal\Core\Entity\Query\ConditionInterface
     *
     * @see \Drupal\Core\Entity\Query\QueryInterface::exists()
     */
    public function exists($field, $function, $langcode = NULL);
    
    /**
     * Queries for the nonexistence of a field.
     *
     * @param string $field
     *   The field to query for nonexistence.
     * @param string $function
     *   The function.
     * @param string $langcode
     *   (optional) For which language the entity should be prepared, defaults to
     *   the current content language.
     *
     * @return \Drupal\Core\Entity\Query\ConditionInterface
     *
     * @see \Drupal\Core\Entity\Query\QueryInterface::notExists()
     */
    public function notExists($field, $function, $langcode = NULL);
    
    /**
     * Gets a complete list of all conditions in this conditional clause.
     *
     * This method returns by reference. That allows alter hooks to access the
     * data structure directly and manipulate it before it gets compiled.
     *
     * @return array
     */
    public function &conditions();
    
    /**
     * Compiles this conditional clause.
     *
     * @param $query
     *   The query object this conditional clause belongs to.
     */
    public function compile($query);

}

Members

Title Sort descending Modifiers Object type Summary Overrides
ConditionAggregateInterface::compile public function Compiles this conditional clause. 1
ConditionAggregateInterface::condition public function Adds a condition. 1
ConditionAggregateInterface::conditions public function Gets a complete list of all conditions in this conditional clause.
ConditionAggregateInterface::exists public function Queries for the existence of a field. 1
ConditionAggregateInterface::getConjunction public function Gets the current conjunction.
ConditionAggregateInterface::notExists public function Queries for the nonexistence of a field. 1

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