private function getRoute(Request $request)
    {
        $route = $request->attributes->get('_route');

        return empty($route) ? self::UNDEFINED_ROUTE : $route;
    }
private function getRoute(Request $request)
    {
        $route = $request->attributes->get('_route');

        return empty($route) ? self::UNDEFINED_ROUTE : $route;
    }
private function getRoute ( Request $ request ) { $ route = $ request -> attributes -> get ( '_route' ) ; return empty ( $ route ) ? self :: UNDEFINED_ROUTE : $ route ; }
Returns route name from request.

@param Request $request

@return string
Returns route name from request .