mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
[backend] prepare new page: controller, route, link and minimal template
This commit is contained in:
@@ -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 = [];
|
||||
|
Reference in New Issue
Block a user