|
19 | 19 | use Doctrine\ORM\QueryBuilder; |
20 | 20 | use Doctrine\ORM\Id\AssignedGenerator; |
21 | 21 | use Doctrine\ORM\Mapping\ClassMetadata; |
| 22 | +use Symfony\Bundle\SecurityBundle\Security; |
22 | 23 | use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; |
23 | 24 | use Symfony\Component\Security\Core\Exception\AccessDeniedException; |
24 | 25 |
|
@@ -68,23 +69,27 @@ class EntityHandler |
68 | 69 | private $fundingOrgFilter; |
69 | 70 |
|
70 | 71 | /** |
71 | | - * Constructor for EntityHandler. |
| 72 | + * Security Bundle. |
72 | 73 | * |
73 | | - * @param EntityManagerInterface $entityManager The entity manager to use. |
74 | | - * @param AuthorizationCheckerInterface $authorizationChecker The authorization checker to use. |
75 | | - * @param EntityEventDispatcher $entityEventDispatcher The entity event dispatcher. |
76 | | - * @param FundingOrgFilter $fundingOrgFilter Utility to filter by funding organization. |
| 74 | + * @var Security |
| 75 | + */ |
| 76 | + private $security; |
| 77 | + |
| 78 | + /** |
| 79 | + * Constructor for EntityHandler. |
77 | 80 | */ |
78 | 81 | public function __construct( |
79 | 82 | EntityManagerInterface $entityManager, |
80 | 83 | AuthorizationCheckerInterface $authorizationChecker, |
81 | 84 | EntityEventDispatcher $entityEventDispatcher, |
82 | | - FundingOrgFilter $fundingOrgFilter |
| 85 | + FundingOrgFilter $fundingOrgFilter, |
| 86 | + Security $security |
83 | 87 | ) { |
84 | 88 | $this->entityManager = $entityManager; |
85 | 89 | $this->authorizationChecker = $authorizationChecker; |
86 | 90 | $this->entityEventDispatcher = $entityEventDispatcher; |
87 | 91 | $this->fundingOrgFilter = $fundingOrgFilter; |
| 92 | + $this->security = $security; |
88 | 93 | } |
89 | 94 |
|
90 | 95 | /** |
|
0 commit comments