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