public function getNumberOfRecordsInIndexPerType()
    {
        $queryBuilder = Db::getQueryBuilder('tx_kesearch_index');
        $typeCount = $queryBuilder
            ->select('type')
            ->addSelectLiteral(
                $queryBuilder->expr()->count('tx_kesearch_index.uid', 'count')
            )
            ->from('tx_kesearch_index')
            ->groupBy('tx_kesearch_index.type')
            ->execute();

        $resultsPerType = [];
        while ($row = $typeCount->fetch()) {
            $resultsPerType[$row['type']] = $row['count'];
        }

        return $resultsPerType;
    }
public function getNumberOfRecordsInIndexPerType()
    {
        $queryBuilder = Db::getQueryBuilder('tx_kesearch_index');
        $typeCount = $queryBuilder
            ->select('type')
            ->addSelectLiteral(
                $queryBuilder->expr()->count('tx_kesearch_index.uid', 'count')
            )
            ->from('tx_kesearch_index')
            ->groupBy('tx_kesearch_index.type')
            ->execute();

        $resultsPerType = [];
        while ($row = $typeCount->fetch()) {
            $resultsPerType[$row['type']] = $row['count'];
        }

        return $resultsPerType;
    }
public function getNumberOfRecordsInIndexPerType ( ) { $ queryBuilder = Db :: getQueryBuilder ( 'tx_kesearch_index' ) ; $ typeCount = $ queryBuilder -> select ( 'type' ) -> addSelectLiteral ( $ queryBuilder -> expr ( ) -> count ( 'tx_kesearch_index.uid' , 'count' ) ) -> from ( 'tx_kesearch_index' ) -> groupBy ( 'tx_kesearch_index.type' ) -> execute ( ) ; $ resultsPerType = [ ] ; while ( $ row = $ typeCount -> fetch ( ) ) { $ resultsPerType [ $ row [ 'type' ] ] = $ row [ 'count' ] ; } return $ resultsPerType ; }
returns number of records per type in an array
@author Christian Bülter <buelter@kennziffer.com>
@since 28.04.15
@return array
returns number of records per type in an array