mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-01 20:43:49 +00:00
Merge remote-tracking branch 'origin/master' into fix-phpstan-issues-202303
This commit is contained in:
@@ -207,6 +207,7 @@ class CalendarController extends AbstractController
|
||||
'entityClassName' => Calendar::class,
|
||||
'entityId' => $entity->getId(),
|
||||
'template' => $template->getId(),
|
||||
'returnPath' => $request->getRequestUri(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -377,7 +378,9 @@ class CalendarController extends AbstractController
|
||||
$this->addFlash('success', $this->translator->trans('Success : calendar item created!'));
|
||||
|
||||
if ($form->get('save_and_upload_doc')->isClicked()) {
|
||||
return $this->redirectToRoute('chill_calendar_calendardoc_new', ['id' => $entity->getId()]);
|
||||
return $this->redirectToRoute('chill_calendar_calendardoc_new', [
|
||||
'id' => $entity->getId()
|
||||
]);
|
||||
}
|
||||
|
||||
foreach ($templates as $template) {
|
||||
@@ -386,6 +389,7 @@ class CalendarController extends AbstractController
|
||||
'entityClassName' => Calendar::class,
|
||||
'entityId' => $entity->getId(),
|
||||
'template' => $template->getId(),
|
||||
'returnPath' => $this->generateUrl('chill_calendar_calendar_edit', ['id' => $entity->getId()]),
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -526,14 +530,20 @@ class CalendarController extends AbstractController
|
||||
'comment' => $calendar->getComment()->getComment(),
|
||||
];
|
||||
|
||||
return $this->redirectToRoute(
|
||||
'chill_activity_activity_new',
|
||||
[
|
||||
'accompanying_period_id' => $calendar->getAccompanyingPeriod()->getId(),
|
||||
'activityData' => $activityData,
|
||||
'returnPath' => $request->query->get('returnPath', null),
|
||||
]
|
||||
);
|
||||
$routeParams = [
|
||||
'activityData' => $activityData,
|
||||
'returnPath' => $request->query->get('returnPath', null),
|
||||
];
|
||||
|
||||
if ($calendar->getContext() === 'accompanying_period') {
|
||||
$routeParams['accompanying_period_id'] = $calendar->getAccompanyingPeriod()->getId();
|
||||
} elseif ($calendar->getContext() === 'person') {
|
||||
$routeParams['person_id'] = $calendar->getPerson()->getId();
|
||||
} else {
|
||||
throw new RuntimeException('context not found for this calendar');
|
||||
}
|
||||
|
||||
return $this->redirectToRoute('chill_activity_activity_new', $routeParams);
|
||||
}
|
||||
|
||||
private function buildListFilterOrder(): FilterOrderHelper
|
||||
|
Reference in New Issue
Block a user