src/Bridge/Doctrine/Orm/Util/QueryBuilderHelper.php
public static function findRootAlias(string $alias, QueryBuilder $queryBuilder): string
    {
        if (\in_array($alias, $queryBuilder->getRootAliases(), true)) {
            return $alias;
        }

        foreach ($queryBuilder->getDQLPart('join') as $rootAlias => $joins) {
            foreach ($joins as $join) {
                if ($alias === $join->getAlias()) {
                    return $rootAlias;
                }
            }
        }

        throw new \LogicException(sprintf('The alias "%s" does not exist in the QueryBuilder.', $alias));
    }
public static function findRootAlias(string $alias, QueryBuilder $queryBuilder): string
    {
        if (\in_array($alias, $queryBuilder->getRootAliases(), true)) {
            return $alias;
        }

        foreach ($queryBuilder->getDQLPart('join') as $rootAlias => $joins) {
            foreach ($joins as $join) {
                if ($alias === $join->getAlias()) {
                    return $rootAlias;
                }
            }
        }

        throw new \LogicException(sprintf('The alias "%s" does not exist in the QueryBuilder.', $alias));
    }
public static function findRootAlias ( string $ alias , QueryBuilder $ queryBuilder ) : string { if ( \ in_array ( $ alias , $ queryBuilder -> getRootAliases ( ) , true ) ) { return $ alias ; } foreach ( $ queryBuilder -> getDQLPart ( 'join' ) as $ rootAlias => $ joins ) { foreach ( $ joins as $ join ) { if ( $ alias === $ join -> getAlias ( ) ) { return $ rootAlias ; } } } throw new \ LogicException ( sprintf ( 'The alias "%s" does not exist in the QueryBuilder.' , $ alias ) ) ; }
Finds the root alias for an alias used in the QueryBuilder.
Finds the root alias for an alias used in the QueryBuilder .