protected function buildWhereOr(QueryBuilder $qb, $parentColumnName, array $options)
    {
        $orX = $qb->expr()->orX();
        foreach ($options as $columnName => $option) {
            if (empty($options[$columnName])) {
                continue;
            } elseif (Arr::isIndexed($options)) {
                $key = $parentColumnName . '_' . $columnName;
                $orX->add("$parentColumnName = :$key");
                $qb->setParameter($key, $option);
            } else {
                $orX->add("$columnName = :$columnName");
                $qb->setParameter($columnName, $option);
            }
        }

        return $orX;
    }
protected function buildWhereOr(QueryBuilder $qb, $parentColumnName, array $options)
    {
        $orX = $qb->expr()->orX();
        foreach ($options as $columnName => $option) {
            if (empty($options[$columnName])) {
                continue;
            } elseif (Arr::isIndexed($options)) {
                $key = $parentColumnName . '_' . $columnName;
                $orX->add("$parentColumnName = :$key");
                $qb->setParameter($key, $option);
            } else {
                $orX->add("$columnName = :$columnName");
                $qb->setParameter($columnName, $option);
            }
        }

        return $orX;
    }
protected function buildWhereOr ( QueryBuilder $ qb , $ parentColumnName , array $ options ) { $ orX = $ qb -> expr ( ) -> orX ( ) ; foreach ( $ options as $ columnName => $ option ) { if ( empty ( $ options [ $ columnName ] ) ) { continue ; } elseif ( Arr :: isIndexed ( $ options ) ) { $ key = $ parentColumnName . '_' . $ columnName ; $ orX -> add ( "$parentColumnName = :$key" ) ; $ qb -> setParameter ( $ key , $ option ) ; } else { $ orX -> add ( "$columnName = :$columnName" ) ; $ qb -> setParameter ( $ columnName , $ option ) ; } } return $ orX ; }
Build an OR group that is added to the AND.

@param QueryBuilder $qb
@param string       $parentColumnName
@param array        $options

@return CompositeExpression
Build an OR group that is added to the AND .