public function getSingleRecords()
    {
        $singleRecords = [];
        $singleRecordUids = GeneralUtility::intExplode(',', $this->conf['singleSelection'], true);
        $pids = GeneralUtility::intExplode(',', $this->conf['pidList'], true);

        if (!empty($singleRecordUids)) {
            $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tt_address');
            $queryBuilder->setRestrictions(GeneralUtility::makeInstance(FrontendRestrictionContainer::class));
            $queryBuilder
                ->select('*')
                ->from('tt_address')
                ->where(
                    $queryBuilder->expr()->in('uid', $singleRecordUids)
                );

            if (!empty($pids)) {
                $queryBuilder->andWhere($queryBuilder->expr()->in('pid', $pids));
            }

            $result = $queryBuilder->execute();
            while ($address = $result->fetch()) {
                $singleRecords[$address['uid']] = $this->getGroupsForAddress($address);
            }
        }
        return $singleRecords;
    }
public function getSingleRecords()
    {
        $singleRecords = [];
        $singleRecordUids = GeneralUtility::intExplode(',', $this->conf['singleSelection'], true);
        $pids = GeneralUtility::intExplode(',', $this->conf['pidList'], true);

        if (!empty($singleRecordUids)) {
            $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tt_address');
            $queryBuilder->setRestrictions(GeneralUtility::makeInstance(FrontendRestrictionContainer::class));
            $queryBuilder
                ->select('*')
                ->from('tt_address')
                ->where(
                    $queryBuilder->expr()->in('uid', $singleRecordUids)
                );

            if (!empty($pids)) {
                $queryBuilder->andWhere($queryBuilder->expr()->in('pid', $pids));
            }

            $result = $queryBuilder->execute();
            while ($address = $result->fetch()) {
                $singleRecords[$address['uid']] = $this->getGroupsForAddress($address);
            }
        }
        return $singleRecords;
    }
public function getSingleRecords ( ) { $ singleRecords = [ ] ; $ singleRecordUids = GeneralUtility :: intExplode ( ',' , $ this -> conf [ 'singleSelection' ] , true ) ; $ pids = GeneralUtility :: intExplode ( ',' , $ this -> conf [ 'pidList' ] , true ) ; if ( ! empty ( $ singleRecordUids ) ) { $ queryBuilder = GeneralUtility :: makeInstance ( ConnectionPool :: class ) -> getQueryBuilderForTable ( 'tt_address' ) ; $ queryBuilder -> setRestrictions ( GeneralUtility :: makeInstance ( FrontendRestrictionContainer :: class ) ) ; $ queryBuilder -> select ( '*' ) -> from ( 'tt_address' ) -> where ( $ queryBuilder -> expr ( ) -> in ( 'uid' , $ singleRecordUids ) ) ; if ( ! empty ( $ pids ) ) { $ queryBuilder -> andWhere ( $ queryBuilder -> expr ( ) -> in ( 'pid' , $ pids ) ) ; } $ result = $ queryBuilder -> execute ( ) ; while ( $ address = $ result -> fetch ( ) ) { $ singleRecords [ $ address [ 'uid' ] ] = $ this -> getGroupsForAddress ( $ address ) ; } } return $ singleRecords ; }
gets the records the user selected in the single address selection field

@return array Array of addresses with their uids as array keys
gets the records the user selected in the single address selection field