src/Utilities/QueryBuilderUtility.php
public static function getRootAlias(QueryBuilder $queryBuilder)
    {
        $aliases = $queryBuilder->getRootAliases();

        /*
         * No aliases?
         * Nothing to do
         */
        if (empty($aliases)) {
            return null;
        }

        return Arrays::getFirstElement($aliases);
    }
public static function getRootAlias(QueryBuilder $queryBuilder)
    {
        $aliases = $queryBuilder->getRootAliases();

        /*
         * No aliases?
         * Nothing to do
         */
        if (empty($aliases)) {
            return null;
        }

        return Arrays::getFirstElement($aliases);
    }
public static function getRootAlias ( QueryBuilder $ queryBuilder ) { $ aliases = $ queryBuilder -> getRootAliases ( ) ; /*
         * No aliases?
         * Nothing to do
         */ if ( empty ( $ aliases ) ) { return null ; } return Arrays :: getFirstElement ( $ aliases ) ; }
Returns root alias of given query builder.
If null is returned, alias was not found.

@param QueryBuilder $queryBuilder The query builder to retrieve root alias
@return null|string
Returns root alias of given query builder . If null is returned alias was not found .