You are here

protected function GroupListBuilder::getEntityIds in Group 2.0.x

Same name and namespace in other branches
  1. 8 src/Entity/Controller/GroupListBuilder.php \Drupal\group\Entity\Controller\GroupListBuilder::getEntityIds()

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

Return value

array An array of entity IDs.

Overrides EntityListBuilder::getEntityIds

File

src/Entity/Controller/GroupListBuilder.php, line 148

Class

GroupListBuilder
Provides a list controller for group entities.

Namespace

Drupal\group\Entity\Controller

Code

protected function getEntityIds() {
  $query = $this
    ->getStorage()
    ->getQuery();

  // Add a simple table sort by header, see ::buildHeader().
  $header = $this
    ->buildHeader();
  $query
    ->tableSort($header);

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