protected function getOrderByExpressionAsString(InternalOrderByInfo $orderBy)
    {
        $result = '';
        foreach ($orderBy->getOrderByInfo()->getOrderByPathSegments() as $order) {
            foreach ($order->getSubPathSegments() as $subOrder) {
                $result .= $result ? ', ' : '';
                $result .= $subOrder->getName();
                $result .= $order->isAscending() ? ' ASC' : ' DESC';
            }
        }
        return $result;
    }
protected function getOrderByExpressionAsString(InternalOrderByInfo $orderBy)
    {
        $result = '';
        foreach ($orderBy->getOrderByInfo()->getOrderByPathSegments() as $order) {
            foreach ($order->getSubPathSegments() as $subOrder) {
                $result .= $result ? ', ' : '';
                $result .= $subOrder->getName();
                $result .= $order->isAscending() ? ' ASC' : ' DESC';
            }
        }
        return $result;
    }
protected function getOrderByExpressionAsString ( InternalOrderByInfo $ orderBy ) { $ result = '' ; foreach ( $ orderBy -> getOrderByInfo ( ) -> getOrderByPathSegments ( ) as $ order ) { foreach ( $ order -> getSubPathSegments ( ) as $ subOrder ) { $ result .= $ result ? ', ' : '' ; $ result .= $ subOrder -> getName ( ) ; $ result .= $ order -> isAscending ( ) ? ' ASC' : ' DESC' ; } } return $ result ; }
Get part of SQL query with ORDER BY condition

@param InternalOrderByInfo $orderBy Order by condition

@return string ORDER BY condition
Get part of SQL query with ORDER BY condition