You are here

protected function DomainPathListBuilder::getEntityIds in Domain Path 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/Controller/DomainPathListBuilder.php, line 77

Class

DomainPathListBuilder
Provides a list controller for domain_path entity.

Namespace

Drupal\domain_path\Controller

Code

protected function getEntityIds() {
  $query = $this
    ->getStorage()
    ->getQuery();
  $search = $this->currentRequest->query
    ->get('search');
  if ($search) {
    $query
      ->condition('alias', $search, 'CONTAINS');
  }

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

  // Allow the entity query to sort using the table header.
  $header = $this
    ->buildHeader();
  $query
    ->tableSort($header);
  return $query
    ->execute();
}