public function useUserAccessGroups(array $groups): QueryBuilder
    {
        $groups = array_map('intval', $groups);
        $groups[] = 0; // always grant access to public documents
        $groups = array_unique($groups);
        sort($groups, SORT_NUMERIC);

        $accessFilter = '{!typo3access}' . implode(',', $groups);
        $this->queryToBuild->removeFilterQuery('access');
        return $this->useFilter($accessFilter, 'access');
    }
public function useUserAccessGroups(array $groups): QueryBuilder
    {
        $groups = array_map('intval', $groups);
        $groups[] = 0; // always grant access to public documents
        $groups = array_unique($groups);
        sort($groups, SORT_NUMERIC);

        $accessFilter = '{!typo3access}' . implode(',', $groups);
        $this->queryToBuild->removeFilterQuery('access');
        return $this->useFilter($accessFilter, 'access');
    }
public function useUserAccessGroups ( array $ groups ) : QueryBuilder { $ groups = array_map ( 'intval' , $ groups ) ; $ groups [ ] = 0 ; // always grant access to public documents $ groups = array_unique ( $ groups ) ; sort ( $ groups , SORT_NUMERIC ) ; $ accessFilter = '{!typo3access}' . implode ( ',' , $ groups ) ; $ this -> queryToBuild -> removeFilterQuery ( 'access' ) ; return $ this -> useFilter ( $ accessFilter , 'access' ) ; }
Can be used to filter the result on an applied list of user groups.

@param array $groups
@return QueryBuilder
Can be used to filter the result on an applied list of user groups .