From eff224ed1c4b177692f054f4e62946515f2684c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Pre=C3=9Fl?= Date: Fri, 2 Aug 2024 15:00:18 +0200 Subject: [PATCH] Update PageBreadcrumbListener.php (#40) --- src/EventListener/PageBreadcrumbListener.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/EventListener/PageBreadcrumbListener.php b/src/EventListener/PageBreadcrumbListener.php index 8a41b31..292ecfa 100644 --- a/src/EventListener/PageBreadcrumbListener.php +++ b/src/EventListener/PageBreadcrumbListener.php @@ -17,7 +17,7 @@ use Doctrine\DBAL\Connection; use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBagInterface; -use Symfony\Component\Security\Core\Security; +use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; /** * Overrides the default breadcrumb menu, we want to show folder pages before root pages. @@ -29,7 +29,7 @@ class PageBreadcrumbListener public function __construct( private readonly Connection $connection, private readonly RequestStack $requestStack, - private readonly Security $security, + private readonly AuthorizationCheckerInterface $authorizationChecker, ) { } @@ -74,7 +74,7 @@ private function addBreadcrumb(): void $arrIds = []; $arrLinks = []; - $objUser = $this->security->getUser(); + $objUser = $this->authorizationChecker->getUser(); if (!$objUser instanceof BackendUser) { return;