Total Complexity | 5 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
12 | class AccessListener extends ContainerListener |
||
13 | { |
||
14 | /** |
||
15 | * Create access across all microservices when a role is created |
||
16 | * |
||
17 | * @param \AppBundle\Entity\Role $role |
||
18 | */ |
||
19 | public function postPersist(Role $role) |
||
23 | } |
||
24 | |||
25 | /** |
||
26 | * Update access across all microservices when a role is updated |
||
27 | * |
||
28 | * @param \AppBundle\Entity\Role $role |
||
29 | */ |
||
30 | public function postUpdate(Role $role) |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * Remove access across all microservices when a role is removed |
||
39 | * |
||
40 | * The preFlush event is used instead of postRemove as a workaround soft-deletable |
||
41 | * |
||
42 | * @param \Doctrine\ORM\Event\PreFlushEventArgs $event |
||
43 | */ |
||
44 | public function preFlush(PreFlushEventArgs $event) |
||
56 |