EntityListBuilder::getEntityIds

protected EntityListBuilder::getEntityIds()

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

Return value

array An array of entity IDs.

File

core/lib/Drupal/Core/Entity/EntityListBuilder.php, line 90

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();
}
doc_Drupal
2016-10-29 09:06:52
Comments
Leave a Comment

Please login to continue.