mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-25 17:13:49 +00:00
controller return json to vue via twig, corrections
This commit is contained in:
@@ -209,14 +209,14 @@ class ActivityController extends AbstractController
|
||||
throw $this->createNotFoundException('Template not found');
|
||||
}
|
||||
|
||||
$activity_json = $this->serializer->serialize($entity, 'json', ['groups' => 'read']);
|
||||
$activity_array = $this->serializer->normalize($entity, 'json', ['groups' => 'read']);
|
||||
|
||||
return $this->render($view, [
|
||||
'person' => $person,
|
||||
'accompanyingCourse' => $accompanyingPeriod,
|
||||
'entity' => $entity,
|
||||
'form' => $form->createView(),
|
||||
'activity_json' => $activity_json
|
||||
'activity_json' => $activity_array
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -323,7 +323,7 @@ class ActivityController extends AbstractController
|
||||
throw $this->createNotFoundException('Template not found');
|
||||
}
|
||||
|
||||
$activity_json = $this->serializer->serialize($entity, 'json', ['groups' => ['read']]);
|
||||
$activity_array = $this->serializer->normalize($entity, 'json', ['groups' => 'read']);
|
||||
|
||||
return $this->render($view, array(
|
||||
'entity' => $entity,
|
||||
@@ -331,7 +331,7 @@ class ActivityController extends AbstractController
|
||||
'delete_form' => $deleteForm->createView(),
|
||||
'person' => $person,
|
||||
'accompanyingCourse' => $accompanyingPeriod,
|
||||
'activity_json' => $activity_json
|
||||
'activity_json' => $activity_array
|
||||
));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user