diff --git a/src/Controller/ProfileController.php b/src/Controller/ProfileController.php new file mode 100644 index 0000000..5a2e7de --- /dev/null +++ b/src/Controller/ProfileController.php @@ -0,0 +1,36 @@ +findOneBy(['idParticipant' => $uuid]); + return $this->render('profile/view.html.twig', [ + 'profile' => $currentProfile, + ]); + } + + #[Route('/profile/edit/{uuid}', name: 'profile_edit', methods: ['GET', 'POST'])] + public function editProfile(string $uuid, ParticipantRepository $participantRepository, Request $request): Response + { + $currentProfile = $participantRepository->findOneBy(['idParticipant' => $uuid]); + $form = $this->createForm(RegistrationFormType::class, $currentProfile); + $form->handleRequest($request); + if ($form->isSubmitted() && $form->isValid()) { + + } + return $this->render('profile/view.html.twig', [ + 'profile' => $currentProfile, + ]); + } +} diff --git a/templates/main/header.html.twig b/templates/main/header.html.twig index f76085d..c005059 100644 --- a/templates/main/header.html.twig +++ b/templates/main/header.html.twig @@ -23,10 +23,10 @@ burger-menu