private function createNodeQueryBuilder(array $translations = null, bool $useAlwaysAvailable = true): QueryBuilder
    {
        $queryBuilder = $this->connection->createQueryBuilder();
        $queryBuilder
            ->select('t.*')
            ->from('ezcontentobject_tree', 't');

        if (!empty($translations)) {
            $dbPlatform = $this->connection->getDatabasePlatform();
            $expr = $queryBuilder->expr();
            $mask = $this->languageMaskGenerator->generateLanguageMaskFromLanguageCodes(
                $translations,
                $useAlwaysAvailable
            );

            $queryBuilder->innerJoin(
                't',
                'ezcontentobject',
                'c',
                $expr->andX(
                    $expr->eq('t.contentobject_id', 'c.id'),
                    $expr->gt(
                        $dbPlatform->getBitAndComparisonExpression('c.language_mask', $mask),
                        0
                    )
                )
            );
        }

        return $queryBuilder;
    }
private function createNodeQueryBuilder(array $translations = null, bool $useAlwaysAvailable = true): QueryBuilder
    {
        $queryBuilder = $this->connection->createQueryBuilder();
        $queryBuilder
            ->select('t.*')
            ->from('ezcontentobject_tree', 't');

        if (!empty($translations)) {
            $dbPlatform = $this->connection->getDatabasePlatform();
            $expr = $queryBuilder->expr();
            $mask = $this->languageMaskGenerator->generateLanguageMaskFromLanguageCodes(
                $translations,
                $useAlwaysAvailable
            );

            $queryBuilder->innerJoin(
                't',
                'ezcontentobject',
                'c',
                $expr->andX(
                    $expr->eq('t.contentobject_id', 'c.id'),
                    $expr->gt(
                        $dbPlatform->getBitAndComparisonExpression('c.language_mask', $mask),
                        0
                    )
                )
            );
        }

        return $queryBuilder;
    }
private function createNodeQueryBuilder ( array $ translations = null , bool $ useAlwaysAvailable = true ) : QueryBuilder { $ queryBuilder = $ this -> connection -> createQueryBuilder ( ) ; $ queryBuilder -> select ( 't.*' ) -> from ( 'ezcontentobject_tree' , 't' ) ; if ( ! empty ( $ translations ) ) { $ dbPlatform = $ this -> connection -> getDatabasePlatform ( ) ; $ expr = $ queryBuilder -> expr ( ) ; $ mask = $ this -> languageMaskGenerator -> generateLanguageMaskFromLanguageCodes ( $ translations , $ useAlwaysAvailable ) ; $ queryBuilder -> innerJoin ( 't' , 'ezcontentobject' , 'c' , $ expr -> andX ( $ expr -> eq ( 't.contentobject_id' , 'c.id' ) , $ expr -> gt ( $ dbPlatform -> getBitAndComparisonExpression ( 'c.language_mask' , $ mask ) , 0 ) ) ) ; } return $ queryBuilder ; }
Create QueryBuilder for selecting node data.

@param array|null $translations Filters on language mask of content if provided.
@param bool $useAlwaysAvailable Respect always available flag on content when filtering on $translations.

@return \Doctrine\DBAL\Query\QueryBuilder
Create QueryBuilder for selecting node data .