function QueryInterface::count

Same name in other branches
  1. 9 core/lib/Drupal/Core/Entity/Query/QueryInterface.php \Drupal\Core\Entity\Query\QueryInterface::count()
  2. 8.9.x core/lib/Drupal/Core/Entity/Query/QueryInterface.php \Drupal\Core\Entity\Query\QueryInterface::count()
  3. 11.x core/lib/Drupal/Core/Entity/Query/QueryInterface.php \Drupal\Core\Entity\Query\QueryInterface::count()

Makes this a count query.

For count queries, execute() returns the number entities found.

Return value

$this

1 method overrides QueryInterface::count()
QueryBase::count in core/lib/Drupal/Core/Entity/Query/QueryBase.php

File

core/lib/Drupal/Core/Entity/Query/QueryInterface.php, line 200

Class

QueryInterface
Interface for entity queries.

Namespace

Drupal\Core\Entity\Query

Code

public function count();

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