QueryBase::$alterMetaData

The query metadata for alter purposes. Type: array File core/lib/Drupal/Core/Entity/Query/QueryBase.php, line 88 Class QueryBase The base entity query class. Namespace Drupal\Core\Entity\Query Code protected $alterMetaData;

QueryBase::$allRevisions

Flag indicating whether to query the current revision or all revisions. Type: bool File core/lib/Drupal/Core/Entity/Query/QueryBase.php, line 109 Class QueryBase The base entity query class. Namespace Drupal\Core\Entity\Query Code protected $allRevisions = FALSE;

QueryBase::$aggregate

The list of aggregate expressions. Type: array File core/lib/Drupal/Core/Entity/Query/QueryBase.php, line 53 Class QueryBase The base entity query class. Namespace Drupal\Core\Entity\Query Code protected $aggregate = array();

QueryBase::$accessCheck

Whether access check is requested or not. Defaults to TRUE. Type: bool File core/lib/Drupal/Core/Entity/Query/QueryBase.php, line 102 Class QueryBase The base entity query class. Namespace Drupal\Core\Entity\Query Code protected $accessCheck = TRUE;

QueryBase

The base entity query class. Hierarchy class \Drupal\Core\Entity\Query\QueryBase implements QueryInterface File core/lib/Drupal/Core/Entity/Query/QueryBase.php, line 11 Namespace Drupal\Core\Entity\Query Members Name Modifiers Type Description QueryBase::$accessCheck protected property Whether access check is requested or not. Defaults to TRUE. QueryBase::$aggregate protected property The list of aggregate expressions. QueryBase::$allRevisions protected pro

QueryAggregateInterface::sortAggregate

public QueryAggregateInterface::sortAggregate($field, $function, $direction = 'ASC', $langcode = NULL) Sorts by an aggregated value. Parameters string $field: The name of a field. string $function: The aggregate function. This is only marked optional for interface compatibility, it is illegal to leave it out. string $direction: The order of sorting, either DESC for descending of ASC for ascending. string $langcode: (optional) The language code. Return value \Drupal\Core\Entity\Query\QueryAggr

QueryAggregateInterface::notExistsAggregate

public QueryAggregateInterface::notExistsAggregate($field, $function, $langcode = NULL) Queries for the nonexistence of a field. Parameters string $field.: The name of a field. string $function: The aggregate function. string $langcode: (optional) The language code. Return value \Drupal\Core\Entity\Query\QueryAggregateInterface The called object. File core/lib/Drupal/Core/Entity/Query/QueryAggregateInterface.php, line 98 Class QueryAggregateInterface Defines a interface for aggregated en

QueryAggregateInterface::groupBy

public QueryAggregateInterface::groupBy($field) Specifies the field to group on. Parameters string $field: The name of the field to group by. Return value \Drupal\Core\Entity\Query\QueryAggregateInterface The called object. File core/lib/Drupal/Core/Entity/Query/QueryAggregateInterface.php, line 40 Class QueryAggregateInterface Defines a interface for aggregated entity queries. Namespace Drupal\Core\Entity\Query Code public function groupBy($field);

QueryAggregateInterface::existsAggregate

public QueryAggregateInterface::existsAggregate($field, $function, $langcode = NULL) Queries for the existence of a field. Parameters string $field: The name of the field. string $function: The aggregate function. $langcode: (optional) The language code. Return value \Drupal\Core\Entity\Query\QueryAggregateInterface The called object. File core/lib/Drupal/Core/Entity/Query/QueryAggregateInterface.php, line 83 Class QueryAggregateInterface Defines a interface for aggregated entity queries

QueryAggregateInterface::execute

public QueryAggregateInterface::execute() Executes the aggregate query. $result = $query ->aggregate('nid', 'count') ->condition('status', 1) ->groupby('type') ->executeAggregate(); Will return: $result[0] = array('count_nid' => 3, 'type' => 'page'); $result[1] = array('count_nid' => 1, 'type' => 'poll'); $result[2] = array('count_nid' => 4, 'type' => 'story'); Return value array A list of result row arrays. Each result row contains the aggregate result