@@ -54,6 +54,9 @@ |
||
| 54 | 54 | } |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | + /** |
|
| 58 | + * @return \Starkerxp\StructureBundle\Entity\UtilisateurInterface |
|
| 59 | + */ |
|
| 57 | 60 | protected function getUtilisateur() |
| 58 | 61 | { |
| 59 | 62 | if (!$token = $this->utilisateur->getToken()) { |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | class CampagneCibleManager extends AbstractManager |
| 10 | 10 | { |
| 11 | 11 | |
| 12 | - public function getSupport(Entity $object) |
|
| 12 | + public function getSupport(Entity $object) |
|
| 13 | 13 | { |
| 14 | 14 | return $object instanceof CampagneCible; |
| 15 | 15 | } |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | 'class' => Campagne::class, |
| 36 | 36 | 'multiple' => false, |
| 37 | 37 | 'required' => false, |
| 38 | - 'query_builder' => function (CampagneRepository $repository) { |
|
| 38 | + 'query_builder' => function(CampagneRepository $repository) { |
|
| 39 | 39 | return $repository->getQueryListe(); |
| 40 | 40 | }, |
| 41 | 41 | 'constraints' => [ |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | 'class' => Template::class, |
| 53 | 53 | 'multiple' => false, |
| 54 | 54 | 'required' => false, |
| 55 | - 'query_builder' => function (TemplateRepository $repository) { |
|
| 55 | + 'query_builder' => function(TemplateRepository $repository) { |
|
| 56 | 56 | return $repository->getQueryListe(); |
| 57 | 57 | }, |
| 58 | 58 | 'constraints' => [ |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | return new JsonResponse([]); |
| 65 | 65 | } |
| 66 | 66 | $retour = array_map( |
| 67 | - function ($element) use ($manager, $options) { |
|
| 67 | + function($element) use ($manager, $options) { |
|
| 68 | 68 | return $manager->toArray($element, $this->getFields($options['fields'])); |
| 69 | 69 | }, |
| 70 | 70 | $resultSets |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | return new JsonResponse(["payload" => $this->translate("utilisateur.entity.not_found", "utilisateur")], 404); |
| 185 | 185 | } |
| 186 | 186 | // Un utilisateur ne peut modifier un autre utilisateur sauf si ce dernier est un super admin. |
| 187 | - if($this->getUser()->getId() != $utilisateur->getId() && !$this->isGranted("ROLE_SUPER_ADMIN")){ |
|
| 187 | + if ($this->getUser()->getId() != $utilisateur->getId() && !$this->isGranted("ROLE_SUPER_ADMIN")) { |
|
| 188 | 188 | return new JsonResponse(["payload" => $this->translate("utilisateur.entity.not_updated_is_not_admin", "utilisateur")], 400); |
| 189 | 189 | } |
| 190 | 190 | $manager->beginTransaction(); |