You are here

protected function WorkspaceListBuilder::getEntityIds in Workspace 8

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

Return value

array An array of entity IDs.

Overrides EntityListBuilder::getEntityIds

File

src/WorkspaceListBuilder.php, line 113

Class

WorkspaceListBuilder
Defines a class to build a listing of workspace entities.

Namespace

Drupal\workspace

Code

protected function getEntityIds() {
  $query = $this
    ->getStorage()
    ->getQuery()
    ->sort($this->entityType
    ->getKey('id'))
    ->condition('published', TRUE)
    ->condition('queued_for_delete', FALSE);

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