You are here

protected function BlockContentListBuilder::getEntityIds in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/block_content/src/BlockContentListBuilder.php \Drupal\block_content\BlockContentListBuilder::getEntityIds()
  2. 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_content

Code

protected function getEntityIds() {
  $query = $this
    ->getStorage()
    ->getQuery()
    ->accessCheck(TRUE)
    ->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();
}