You are here

protected function EntityListBuilder::getEntityIds in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Entity/EntityListBuilder.php \Drupal\Core\Entity\EntityListBuilder::getEntityIds()

Loads entity IDs using a pager sorted by the entity id.

Return value

array An array of entity IDs.

2 calls to EntityListBuilder::getEntityIds()
ConfigEntityListBuilder::load in core/lib/Drupal/Core/Config/Entity/ConfigEntityListBuilder.php
Loads entities of this type from storage for listing.
EntityListBuilder::load in core/lib/Drupal/Core/Entity/EntityListBuilder.php
Loads entities of this type from storage for listing.
1 method overrides EntityListBuilder::getEntityIds()
BlockListBuilder::getEntityIds in core/modules/block/src/BlockListBuilder.php
Loads entity IDs using a pager sorted by the entity id.

File

core/lib/Drupal/Core/Entity/EntityListBuilder.php, line 95
Contains \Drupal\Core\Entity\EntityListBuilder.

Class

EntityListBuilder
Defines a generic implementation to build a listing of entities.

Namespace

Drupal\Core\Entity

Code

protected function getEntityIds() {
  $query = $this
    ->getStorage()
    ->getQuery()
    ->sort($this->entityType
    ->getKey('id'));

  // Only add the pager if a limit is specified.
  if ($this->limit) {
    $query
      ->pager($this->limit);
  }
  return $query
    ->execute();
}