protected function getAllQueueItemRecordsByUidsGroupedByTable(array $indexQueueItemRecords) : array
    {
        $tableUids = [];
        $tableRecords = [];
        // grouping records by table
        foreach ($indexQueueItemRecords as $indexQueueItemRecord) {
            $tableUids[$indexQueueItemRecord['item_type']][] = $indexQueueItemRecord['item_uid'];
        }

        // fetching records by table, saves us a lot of single queries
        foreach ($tableUids as $table => $uids) {
            $uidList = implode(',', $uids);

            $queryBuilderForRecordTable = $this->getQueryBuilder();
            $queryBuilderForRecordTable->getRestrictions()->removeAll();
            $resultsFromRecordTable = $queryBuilderForRecordTable
                ->select('*')
                ->from($table)
                ->where($queryBuilderForRecordTable->expr()->in('uid', $uidList))
                ->execute();
            $records = [];
            while ($record = $resultsFromRecordTable->fetch()) {
                $records[$record['uid']] = $record;
            }

            $tableRecords[$table] = $records;
            $this->hookPostProcessFetchRecordsForIndexQueueItem($table, $uids, $tableRecords);
        }

        return $tableRecords;
    }
protected function getAllQueueItemRecordsByUidsGroupedByTable(array $indexQueueItemRecords) : array
    {
        $tableUids = [];
        $tableRecords = [];
        // grouping records by table
        foreach ($indexQueueItemRecords as $indexQueueItemRecord) {
            $tableUids[$indexQueueItemRecord['item_type']][] = $indexQueueItemRecord['item_uid'];
        }

        // fetching records by table, saves us a lot of single queries
        foreach ($tableUids as $table => $uids) {
            $uidList = implode(',', $uids);

            $queryBuilderForRecordTable = $this->getQueryBuilder();
            $queryBuilderForRecordTable->getRestrictions()->removeAll();
            $resultsFromRecordTable = $queryBuilderForRecordTable
                ->select('*')
                ->from($table)
                ->where($queryBuilderForRecordTable->expr()->in('uid', $uidList))
                ->execute();
            $records = [];
            while ($record = $resultsFromRecordTable->fetch()) {
                $records[$record['uid']] = $record;
            }

            $tableRecords[$table] = $records;
            $this->hookPostProcessFetchRecordsForIndexQueueItem($table, $uids, $tableRecords);
        }

        return $tableRecords;
    }
protected function getAllQueueItemRecordsByUidsGroupedByTable ( array $ indexQueueItemRecords ) : array { $ tableUids = [ ] ; $ tableRecords = [ ] ; // grouping records by table foreach ( $ indexQueueItemRecords as $ indexQueueItemRecord ) { $ tableUids [ $ indexQueueItemRecord [ 'item_type' ] ] [ ] = $ indexQueueItemRecord [ 'item_uid' ] ; } // fetching records by table, saves us a lot of single queries foreach ( $ tableUids as $ table => $ uids ) { $ uidList = implode ( ',' , $ uids ) ; $ queryBuilderForRecordTable = $ this -> getQueryBuilder ( ) ; $ queryBuilderForRecordTable -> getRestrictions ( ) -> removeAll ( ) ; $ resultsFromRecordTable = $ queryBuilderForRecordTable -> select ( '*' ) -> from ( $ table ) -> where ( $ queryBuilderForRecordTable -> expr ( ) -> in ( 'uid' , $ uidList ) ) -> execute ( ) ; $ records = [ ] ; while ( $ record = $ resultsFromRecordTable -> fetch ( ) ) { $ records [ $ record [ 'uid' ] ] = $ record ; } $ tableRecords [ $ table ] = $ records ; $ this -> hookPostProcessFetchRecordsForIndexQueueItem ( $ table , $ uids , $ tableRecords ) ; } return $ tableRecords ; }
Returns the records for suitable item type.

@param array $indexQueueItemRecords
@return array
Returns the records for suitable item type .