function EntityListBuilder::getEntityListQuery
Same name in other branches
- 10 core/lib/Drupal/Core/Entity/EntityListBuilder.php \Drupal\Core\Entity\EntityListBuilder::getEntityListQuery()
Returns a query object for loading entity IDs from the storage.
Return value
\Drupal\Core\Entity\Query\QueryInterface A query object used to load entity IDs.
File
-
core/
lib/ Drupal/ Core/ Entity/ EntityListBuilder.php, line 116
Class
- EntityListBuilder
- Defines a generic implementation to build a listing of entities.
Namespace
Drupal\Core\EntityCode
protected function getEntityListQuery() : QueryInterface {
$query = $this->getStorage()
->getQuery()
->accessCheck(TRUE)
->sort($this->entityType
->getKey(static::SORT_KEY));
// Only add the pager if a limit is specified.
if ($this->limit) {
$query->pager($this->limit);
}
return $query;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.