src/Sulu/Bundle/ContactBundle/Entity/ContactRepository.php
private function addWhere($qb, $where, $prefix = '')
    {
        $prefix = '' !== $prefix ? $prefix . '.' : '';
        $and = $qb->expr()->andX();
        foreach ($where as $k => $v) {
            $and->add($qb->expr()->eq($prefix . $k, "'" . $v . "'"));
        }
        $qb->where($and);

        return $qb;
    }
private function addWhere($qb, $where, $prefix = '')
    {
        $prefix = '' !== $prefix ? $prefix . '.' : '';
        $and = $qb->expr()->andX();
        foreach ($where as $k => $v) {
            $and->add($qb->expr()->eq($prefix . $k, "'" . $v . "'"));
        }
        $qb->where($and);

        return $qb;
    }
private function addWhere ( $ qb , $ where , $ prefix = '' ) { $ prefix = '' !== $ prefix ? $ prefix . '.' : '' ; $ and = $ qb -> expr ( ) -> andX ( ) ; foreach ( $ where as $ k => $ v ) { $ and -> add ( $ qb -> expr ( ) -> eq ( $ prefix . $ k , "'" . $ v . "'" ) ) ; } $ qb -> where ( $ and ) ; return $ qb ; }
add where to querybuilder.

@param QueryBuilder $qb
@param array $where
@param string $prefix

@return QueryBuilder
add where to querybuilder .