init new AccompanyingCourse (parcours) section

This commit is contained in:
2021-04-15 11:46:08 +02:00
parent 083f56bff0
commit 16b155d449
13 changed files with 337 additions and 17 deletions

View File

@@ -0,0 +1,63 @@
<?php
namespace Chill\PersonBundle\Controller;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
/**
* Class AccompanyingCourseController
*
* @package Chill\PersonBundle\Controller
*/
class AccompanyingCourseController extends Controller
{
/**
* Homepage of Accompanying Course section
*
* @Route("/{_locale}/parcours/{accompanying_period_id}", name="chill_person_accompanying_course_index")
* @ParamConverter("accompanyingCourse", options={"id": "accompanying_period_id"})
*/
public function indexAction(AccompanyingPeriod $accompanyingCourse): Response
{
return $this->render('@ChillPerson/AccompanyingCourse/index.html.twig', [
'accompanyingCourse' => $accompanyingCourse
]);
}
/**
* Show page of Accompanying Course section
*
* the page show all blocks except one active edit block, managed by vuejs component
* that's why title of page is 'edit accompanying course'
*
* @Route("/{_locale}/parcours/{accompanying_period_id}/show", name="chill_person_accompanying_course_show")
* @ParamConverter("accompanyingCourse", options={"id": "accompanying_period_id"})
*/
public function showAction(AccompanyingPeriod $accompanyingCourse): Response
{
return $this->render('@ChillPerson/AccompanyingCourse/show.html.twig', [
'accompanyingCourse' => $accompanyingCourse
]);
}
/**
* History page of Accompanying Course section
*
* the page show anti chronologic history with all actions, title of page is 'accompanying course details'
*
* @Route("/{_locale}/parcours/{accompanying_period_id}/history", name="chill_person_accompanying_course_history")
* @ParamConverter("accompanyingCourse", options={"id": "accompanying_period_id"})
*/
public function historyAction(AccompanyingPeriod $accompanyingCourse): Response
{
return $this->render('@ChillPerson/AccompanyingCourse/history.html.twig', [
'accompanyingCourse' => $accompanyingCourse
]);
}
}