You are here

protected function EntitySubqueueListBuilder::getEntityIds in Entityqueue 8

Loads entity IDs using a pager sorted by the entity id and optionally filtered by bundle.

Return value

array An array of entity IDs.

Overrides EntityListBuilder::getEntityIds

File

src/EntitySubqueueListBuilder.php, line 70

Class

EntitySubqueueListBuilder
Defines a class that builds a listing of entity subqueues.

Namespace

Drupal\entityqueue

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);
  }
  if ($this->queueId) {
    $query
      ->condition($this->entityType
      ->getKey('bundle'), $this->queueId);
  }
  return $query
    ->execute();
}