Skip to content

Commit

Permalink
Update PageBreadcrumbListener.php (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
pressi authored Aug 2, 2024
1 parent 3aada63 commit eff224e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/EventListener/PageBreadcrumbListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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,
) {
}

Expand Down Expand Up @@ -74,7 +74,7 @@ private function addBreadcrumb(): void

$arrIds = [];
$arrLinks = [];
$objUser = $this->security->getUser();
$objUser = $this->authorizationChecker->getUser();

Check failure on line 77 in src/EventListener/PageBreadcrumbListener.php

View workflow job for this annotation

GitHub Actions / ci / build-tools

Call to an undefined method Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface::getUser().

if (!$objUser instanceof BackendUser) {
return;
Expand Down

0 comments on commit eff224e

Please sign in to comment.