src/Controller/CalendarController.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  4. use Symfony\Component\HttpFoundation\Response;
  5. use Symfony\Component\HttpFoundation\JsonResponse;
  6. use Symfony\Component\Routing\Annotation\Route;
  7. use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
  8. #[Route('/calendar'name'calendar_')]
  9. class CalendarController extends AbstractController
  10. {
  11.     #[Route('/summary'name'summary')]
  12.     public function summary(): Response
  13.     {
  14.         return $this->render('calendar/summary.html.twig', [
  15.         ]);
  16.     }
  17.     
  18.     #[Route('/tapList'name'taplist')]
  19.     public function tapList(): JsonResponse
  20.     {
  21.         $jsonResponse json_decode('[{"title": "Event 1","start": "2022-03-05T09:00:00","end": "2022-03-05T18:00:00", "color": "#009900", "textColor": "#990000"},{"title": "Event 2","start": "2022-03-08","end": "2019-03-10", "backgroundColor": "#000099", "textColor": "#999999"}]');
  22.         
  23.         $response = new JsonResponse($jsonResponse);
  24.         return $response;
  25.     }
  26.     
  27.     #[Route('/add-record'name'addrecord')]
  28.     public function addRecord(): JsonResponse
  29.     {
  30.         $response = new JsonResponse($_POST);
  31.         return $response;
  32.     }
  33.     
  34.     #[Route('/{record}/edit'name'editrecord')]
  35.     public function editRecord(): Response
  36.     {
  37.         return $this->render('members/dominant.html.twig', [
  38.         ]);
  39.     }
  40.     
  41.     #[Route('/{record}/remove'name'removerecord')]
  42.     public function removeRecord(): Response
  43.     {
  44.         return $this->render('members/dominant.html.twig', [
  45.         ]);
  46.     }
  47. }