Services/TableService.php
protected function setTotalRows(Table $table)
    {
        $qb = $table->getQueryBuilder();
        $qbtr = clone $qb;

        $identifiers = $table->getIdentifierFieldNames();

        if (is_null($identifiers)) {
            $paginatorTotal = new Paginator($qbtr->getQuery());
            $count = $paginatorTotal->count();
        } else {
            $qbtr->select($qbtr->expr()->count($identifiers));
            $count = (int) $qbtr->getQuery()->getSingleScalarResult();
        }

        $table->setTotalRows($count);
    }
protected function setTotalRows(Table $table)
    {
        $qb = $table->getQueryBuilder();
        $qbtr = clone $qb;

        $identifiers = $table->getIdentifierFieldNames();

        if (is_null($identifiers)) {
            $paginatorTotal = new Paginator($qbtr->getQuery());
            $count = $paginatorTotal->count();
        } else {
            $qbtr->select($qbtr->expr()->count($identifiers));
            $count = (int) $qbtr->getQuery()->getSingleScalarResult();
        }

        $table->setTotalRows($count);
    }
protected function setTotalRows ( Table $ table ) { $ qb = $ table -> getQueryBuilder ( ) ; $ qbtr = clone $ qb ; $ identifiers = $ table -> getIdentifierFieldNames ( ) ; if ( is_null ( $ identifiers ) ) { $ paginatorTotal = new Paginator ( $ qbtr -> getQuery ( ) ) ; $ count = $ paginatorTotal -> count ( ) ; } else { $ qbtr -> select ( $ qbtr -> expr ( ) -> count ( $ identifiers ) ) ; $ count = ( int ) $ qbtr -> getQuery ( ) -> getSingleScalarResult ( ) ; } $ table -> setTotalRows ( $ count ) ; }
Set total rows count without filters.

@param Table $table
Set total rows count without filters .