You are here

protected function GatsbyLogEntityListBuilder::getEntityIds in Gatsby Live Preview & Incremental Builds 2.0.x

Same name and namespace in other branches
  1. 8 modules/gatsby_fastbuilds/src/GatsbyLogEntityListBuilder.php \Drupal\gatsby_fastbuilds\GatsbyLogEntityListBuilder::getEntityIds()

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

Return value

array An array of entity IDs.

Overrides EntityListBuilder::getEntityIds

File

modules/gatsby_fastbuilds/src/GatsbyLogEntityListBuilder.php, line 37

Class

GatsbyLogEntityListBuilder
Defines a class to build a listing of Gatsby log entity entities.

Namespace

Drupal\gatsby_fastbuilds

Code

protected function getEntityIds() {
  $query = $this
    ->getStorage()
    ->getQuery()
    ->sort('created', 'DESC');

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