src/Sulu/Component/SmartContent/Orm/DataProviderRepositoryTrait.php
private function appendRelationAnd(QueryBuilder $queryBuilder, $relation, $values, $alias)
    {
        $parameter = [];
        $expr = $queryBuilder->expr()->andX();

        $length = count($values);
        for ($i = 0; $i < $length; ++$i) {
            $queryBuilder->leftJoin($relation, $alias . $i);

            $expr->add($queryBuilder->expr()->eq($alias . $i . '.id', ':' . $alias . $i));

            $parameter[$alias . $i] = $values[$i];
        }
        $queryBuilder->andWhere($expr);

        return $parameter;
    }
private function appendRelationAnd(QueryBuilder $queryBuilder, $relation, $values, $alias)
    {
        $parameter = [];
        $expr = $queryBuilder->expr()->andX();

        $length = count($values);
        for ($i = 0; $i < $length; ++$i) {
            $queryBuilder->leftJoin($relation, $alias . $i);

            $expr->add($queryBuilder->expr()->eq($alias . $i . '.id', ':' . $alias . $i));

            $parameter[$alias . $i] = $values[$i];
        }
        $queryBuilder->andWhere($expr);

        return $parameter;
    }
private function appendRelationAnd ( QueryBuilder $ queryBuilder , $ relation , $ values , $ alias ) { $ parameter = [ ] ; $ expr = $ queryBuilder -> expr ( ) -> andX ( ) ; $ length = count ( $ values ) ; for ( $ i = 0 ; $ i < $ length ; ++ $ i ) { $ queryBuilder -> leftJoin ( $ relation , $ alias . $ i ) ; $ expr -> add ( $ queryBuilder -> expr ( ) -> eq ( $ alias . $ i . '.id' , ':' . $ alias . $ i ) ) ; $ parameter [ $ alias . $ i ] = $ values [ $ i ] ; } $ queryBuilder -> andWhere ( $ expr ) ; return $ parameter ; }
Append tags to query builder with "and" operator.

@param QueryBuilder $queryBuilder
@param string $relation
@param int[] $values
@param string $alias

@return array parameter for the query
Append tags to query builder with and operator .