You are here

public function DataProviderDbQuery::count in RESTful 7.2

Counts the total results for the index call.

Return value

int The total number of results for the index call.

Overrides CrudInterface::count

File

src/Plugin/resource/DataProvider/DataProviderDbQuery.php, line 130
Contains \Drupal\restful\Plugin\resource\DataProvider\DataProviderDbQuery.

Class

DataProviderDbQuery

Namespace

Drupal\restful\Plugin\resource\DataProvider

Code

public function count() {
  return intval($this
    ->getQueryForList()
    ->countQuery()
    ->execute()
    ->fetchField());
}