src/Graviton/I18nBundle/Listener/I18nRqlParsingListener.php
private function getAlteredQueryNode($fieldName, array $values)
    {
        $newNode = new OrNode();
        $defaultLanguageFieldName = $fieldName.'.'.$this->intUtils->getDefaultLanguage();

        foreach ($values as $singleValue) {
            $newNode->addQuery($this->getEqNode($fieldName, $singleValue));
            // search default language field (as new structure only has 'en' set after creation and no save)
            $newNode->addQuery(
                $this->getEqNode(
                    $defaultLanguageFieldName,
                    $singleValue
                )
            );
        }

        // add default match
        $newNode->addQuery($this->getEqNode($this->node->getField(), $this->getNodeValue()));

        if (!$this->nodeFieldNameHasLanguage()) {
            // if no language, we add it to the query to default node for default language
            $newNode->addQuery(
                $this->getEqNode(
                    $defaultLanguageFieldName,
                    $this->getNodeValue()
                )
            );
        }

        return $newNode;
    }
private function getAlteredQueryNode($fieldName, array $values)
    {
        $newNode = new OrNode();
        $defaultLanguageFieldName = $fieldName.'.'.$this->intUtils->getDefaultLanguage();

        foreach ($values as $singleValue) {
            $newNode->addQuery($this->getEqNode($fieldName, $singleValue));
            // search default language field (as new structure only has 'en' set after creation and no save)
            $newNode->addQuery(
                $this->getEqNode(
                    $defaultLanguageFieldName,
                    $singleValue
                )
            );
        }

        // add default match
        $newNode->addQuery($this->getEqNode($this->node->getField(), $this->getNodeValue()));

        if (!$this->nodeFieldNameHasLanguage()) {
            // if no language, we add it to the query to default node for default language
            $newNode->addQuery(
                $this->getEqNode(
                    $defaultLanguageFieldName,
                    $this->getNodeValue()
                )
            );
        }

        return $newNode;
    }
private function getAlteredQueryNode ( $ fieldName , array $ values ) { $ newNode = new OrNode ( ) ; $ defaultLanguageFieldName = $ fieldName . '.' . $ this -> intUtils -> getDefaultLanguage ( ) ; foreach ( $ values as $ singleValue ) { $ newNode -> addQuery ( $ this -> getEqNode ( $ fieldName , $ singleValue ) ) ; // search default language field (as new structure only has 'en' set after creation and no save) $ newNode -> addQuery ( $ this -> getEqNode ( $ defaultLanguageFieldName , $ singleValue ) ) ; } // add default match $ newNode -> addQuery ( $ this -> getEqNode ( $ this -> node -> getField ( ) , $ this -> getNodeValue ( ) ) ) ; if ( ! $ this -> nodeFieldNameHasLanguage ( ) ) { // if no language, we add it to the query to default node for default language $ newNode -> addQuery ( $ this -> getEqNode ( $ defaultLanguageFieldName , $ this -> getNodeValue ( ) ) ) ; } return $ newNode ; }
Gets a new query node

@param string $fieldName target fieldname
@param array  $values    the values to set

@return OrNode some node
Gets a new query node