Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. PagerSelectExtender.php

function PagerSelectExtender::getCountQuery

Retrieve the count query for this pager.

The count query may be specified manually or, by default, taken from the query we are extending.

Return value

\Drupal\Core\Database\Query\SelectInterface A count query object.

File

core/lib/Drupal/Core/Database/Query/PagerSelectExtender.php, line 119

Class

PagerSelectExtender
Query extender for pager queries.

Namespace

Drupal\Core\Database\Query

Code

public function getCountQuery() {
    if ($this->customCountQuery) {
        return $this->customCountQuery;
    }
    else {
        return $this->query
            ->countQuery();
    }
}
RSS feed
Powered by Drupal