diff --git a/src/Bundle/ChillActivityBundle/Controller/ActivityController.php b/src/Bundle/ChillActivityBundle/Controller/ActivityController.php index 9b1f3f48a..36dd609f3 100644 --- a/src/Bundle/ChillActivityBundle/Controller/ActivityController.php +++ b/src/Bundle/ChillActivityBundle/Controller/ActivityController.php @@ -266,16 +266,19 @@ final class ActivityController extends AbstractController $activity_array = $this->serializer->normalize($entity, 'json', ['groups' => 'read']); + $defaultLocationId = $this->getUser()->getCurrentLocation()->getId(); + return $this->render($view, [ 'person' => $person, 'accompanyingCourse' => $accompanyingPeriod, 'entity' => $entity, 'form' => $form->createView(), - 'activity_json' => $activity_array + 'activity_json' => $activity_array, + 'default_location_id' => $defaultLocationId ]); } - public function showAction(Request $request, $id): Response + public function showAction(Request $request, int $id): Response { $view = null; $em = $this->getDoctrine()->getManager(); @@ -330,7 +333,7 @@ final class ActivityController extends AbstractController * Displays a form to edit an existing Activity entity. * */ - public function editAction($id, Request $request): Response + public function editAction(int $id, Request $request): Response { $view = null; $em = $this->getDoctrine()->getManager();