function QueryInterface::execute

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

Execute the query.

Return value

int|array Returns an integer for count queries or an array of ids. The values of the array are always entity ids. The keys will be revision ids if the entity supports revision and entity ids if not.

5 methods override QueryInterface::execute()
Query::execute in core/lib/Drupal/Core/Config/Entity/Query/Query.php
Execute the query.
Query::execute in core/lib/Drupal/Core/Entity/Query/Sql/Query.php
Execute the query.
Query::execute in core/lib/Drupal/Core/Entity/Query/Null/Query.php
Execute the query.
Query::execute in core/lib/Drupal/Core/Entity/KeyValueStore/Query/Query.php
Execute the query.
QueryAggregateInterface::execute in core/lib/Drupal/Core/Entity/Query/QueryAggregateInterface.php
Executes the aggregate query.

File

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

Class

QueryInterface
Interface for entity queries.

Namespace

Drupal\Core\Entity\Query

Code

public function execute();

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