<?phpnamespace App\Controller\ThemesWebsite\Whileresume\Application;use App\Entity\Core\Users;use App\Entity\Cvs\Candidates;use App\Entity\Cvs\CandidatesHasExperiences;use App\Entity\Cvs\CandidatesHasProjects;use App\Entity\Cvs\CandidatesHasServices;use App\Entity\Cvs\CandidatesHasSkills;use App\Entity\Cvs\Jobs;use App\Form\Core\UsersType;use App\Form\Cvs\JobsForm;use App\Services\Core\RequestData;use Sensio\Bundle\FrameworkExtraBundle\Configuration\Cache;use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted;use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;use Symfony\Component\EventDispatcher\EventDispatcherInterface;use Symfony\Component\HttpFoundation\Request;use Symfony\Component\HttpFoundation\Response;use Symfony\Component\Routing\Annotation\Route;use Symfony\Component\HttpFoundation\Cookie;use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;use Doctrine\ORM\EntityManagerInterface;class JobsController extends AbstractController{ private $rd; private $em; public function __construct(RequestData $rd, EntityManagerInterface $em ) { $this->rd = $rd; $this->em = $em; } public function new(Request $request): Response { $locale = $request->getLocale(); $job = new Jobs(); $form = $this->createForm(JobsForm::class, $job); $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { die('ici'); } return $this->render('application/whileresume/application/jobs/new_'.$locale.'.html.twig',[ 'form' => $form->createView(), ]); } public function show(Request $request, $slug): Response { $locale = $request->getLocale(); $job = $this->em->getRepository(Jobs::class)->findOneBy(['slug' => $slug]); return $this->render('application/whileresume/application/jobs/show_'.$locale.'.html.twig',[ 'slug' => $slug, 'job' => $job, ]); }}