@@ -73,10 +73,13 @@ class UrlResolver | |||
public function getRouteCurrentRequest(): ?string | |||
{ | |||
if(!$this->requestStack->getCurrentRequest()) { | |||
return null; | |||
} | |||
$requestAttributes = $this->requestStack->getCurrentRequest()->attributes->all(); | |||
$route = isset($requestAttributes['_route']) ? $requestAttributes['_route'] : null; | |||
return $route; | |||
} | |||
} |