[backend] prepare new page: controller, route, link and minimal template

This commit is contained in:
2022-12-13 15:46:17 +01:00
parent 7abecdea02
commit 6ab5e708ec
5 changed files with 53 additions and 2 deletions

View File

@@ -178,6 +178,28 @@ class AccompanyingCourseWorkController extends AbstractController
]);
}
/**
* @Route(
* "{_locale}/person/accompanying-period/work/{id}/show",
* name="chill_person_accompanying_period_work_show",
* methods={"GET"}
* )
*/
public function showWork(AccompanyingPeriodWork $work): Response
{
if (null === $work) {
throw $this->createNotFoundException('Unable to find Work entity.');
}
$this->denyAccessUnlessGranted(AccompanyingPeriodWorkVoter::SEE, $work);
return $this->render('@ChillPerson/AccompanyingCourseWork/show.html.twig', [
'accompanyingCourse' => $work->getAccompanyingPeriod(),
'work' => $work,
]);
}
private function createDeleteForm(int $id): Form
{
$params = [];