From 774437d3196878388e294a3833a73e900000b5e4 Mon Sep 17 00:00:00 2001 From: polo Date: Tue, 23 Dec 2025 15:20:48 +0100 Subject: =?UTF-8?q?choix=20dur=C3=A9e=20stockage=20e-mails,=20relation=20e?= =?UTF-8?q?ntit=C3=A9s=20Email=20<=3D>=20NodeData?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controller/ContactFormController.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/controller/ContactFormController.php') diff --git a/src/controller/ContactFormController.php b/src/controller/ContactFormController.php index 243740f..0724401 100644 --- a/src/controller/ContactFormController.php +++ b/src/controller/ContactFormController.php @@ -16,6 +16,15 @@ class ContactFormController echo json_encode(['success' => true, 'checked' => $json['checked']]); die; } + static public function setEmailsRetentionPeriod(EntityManager $entityManager, array $json): void + { + $form_data = $entityManager->find('App\Entity\NodeData', $json['id']); + $form_data->updateData('retention_period', (int)$json['months']); + $entityManager->persist($form_data); + $entityManager->flush(); + echo json_encode(['success' => true, 'months' => $json['months']]); + die; + } static public function setEmailParam(EntityManager $entityManager, array $json): void { $form = new FormValidation($json, 'email_params'); -- cgit v1.2.3