protected function BlockContentListBuilder::getEntityIds in Drupal 8
Same name and namespace in other branches
- 9 core/modules/block_content/src/BlockContentListBuilder.php \Drupal\block_content\BlockContentListBuilder::getEntityIds()
Loads entity IDs using a pager sorted by the entity id.
Return value
array An array of entity IDs.
Overrides EntityListBuilder::getEntityIds
File
- core/
modules/ block_content/ src/ BlockContentListBuilder.php, line 34
Class
- BlockContentListBuilder
- Defines a class to build a listing of custom block entities.
Namespace
Drupal\block_contentCode
protected function getEntityIds() {
$query = $this
->getStorage()
->getQuery()
->sort($this->entityType
->getKey('id'));
$query
->condition('reusable', TRUE);
// Only add the pager if a limit is specified.
if ($this->limit) {
$query
->pager($this->limit);
}
return $query
->execute();
}