You are here

public function EntityListResponse::total in Thunder 6.2.x

Calculate the total amount of results.

Return value

int The total amount of results.

File

modules/thunder_gqls/src/Wrappers/EntityListResponse.php, line 36

Class

EntityListResponse
The thunder entity list response class.

Namespace

Drupal\thunder_gqls\Wrappers

Code

public function total() {
  $query = clone $this->query;
  $query
    ->range(NULL, NULL)
    ->count();
  return $query
    ->execute();
}