function PagerDefault::setCountQuery

Specify the count query object to use for this pager.

You will rarely need to specify a count query directly. If not specified, one is generated off of the pager query itself.

Parameters

SelectQueryInterface $query: The count query object. It must return a single row with a single column, which is the total number of records.

File

includes/pager.inc, line 106

Class

PagerDefault
Query extender for pager queries.

Code

public function setCountQuery(SelectQueryInterface $query) {
    $this->customCountQuery = $query;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.