You are here

protected function MediaListBuilder::getEntityIds in Drupal 9

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

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

Return value

array An array of entity IDs.

Overrides EntityListBuilder::getEntityIds

File

core/modules/media/src/MediaListBuilder.php, line 150

Class

MediaListBuilder
Provides a listing of media items.

Namespace

Drupal\media

Code

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

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