Category : compare

In my symfony 5 project I would like when submitting a certain form, compare the entity before and after submission. So keep a copy of the original entity in order to perform processing. I’ve : $parametresAdmin = $entrepriseService->getParametresAdmin(); $form = $this->createForm(ParametresAdminType::class, $parametresAdmin, [ ‘entreprise’ => $this->getUser()->getEntreprise(), ]); $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { $entrepriseService->updateParametres($parametresAdmin); return ..

Read more