mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
add return path when creating an activity
This commit is contained in:
parent
e838a82556
commit
1f6565d2ef
@ -179,14 +179,15 @@ final class ActivityController extends AbstractController
|
||||
{
|
||||
$view = null;
|
||||
|
||||
[$person, $accompanyingPeriod] = $this->getEntity($request);
|
||||
|
||||
$entity = $this->activityRepository->find($id);
|
||||
|
||||
if (null === $entity) {
|
||||
throw $this->createNotFoundException('Unable to find Activity entity.');
|
||||
}
|
||||
|
||||
$accompanyingPeriod = $entity->getAccompanyingPeriod();
|
||||
$person = $entity->getPerson();
|
||||
|
||||
if ($entity->getAccompanyingPeriod() instanceof AccompanyingPeriod) {
|
||||
$view = 'ChillActivityBundle:Activity:editAccompanyingCourse.html.twig';
|
||||
$accompanyingPeriod = $entity->getAccompanyingPeriod();
|
||||
@ -445,6 +446,9 @@ final class ActivityController extends AbstractController
|
||||
'template' => $form->get('gendocTemplateId')->getData(),
|
||||
'entityClassName' => Activity::class,
|
||||
'entityId' => $entity->getId(),
|
||||
'returnPath' => $this->generateUrl('chill_activity_activity_edit', [
|
||||
'id' => $entity->getId(),
|
||||
])
|
||||
]
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user