activity: fix type error + add new property for new form

This commit is contained in:
nobohan 2021-11-17 15:19:24 +01:00
parent f0ff4c18af
commit cd4de2e244

View File

@ -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();