diff options
| author | polo <ordipolo@gmx.fr> | 2025-12-23 15:20:48 +0100 |
|---|---|---|
| committer | polo <ordipolo@gmx.fr> | 2025-12-23 15:20:48 +0100 |
| commit | 774437d3196878388e294a3833a73e900000b5e4 (patch) | |
| tree | 5d8449beee8b492fe553460f3c4f1027e8cd123a /src/controller/ContactFormController.php | |
| parent | 8393acd0366ee3408db103ba29e8686bab127f42 (diff) | |
| download | cms-774437d3196878388e294a3833a73e900000b5e4.tar.gz cms-774437d3196878388e294a3833a73e900000b5e4.tar.bz2 cms-774437d3196878388e294a3833a73e900000b5e4.zip | |
choix durée stockage e-mails, relation entités Email <=> NodeData
Diffstat (limited to 'src/controller/ContactFormController.php')
| -rw-r--r-- | src/controller/ContactFormController.php | 9 |
1 files changed, 9 insertions, 0 deletions
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 | |||
| 16 | echo json_encode(['success' => true, 'checked' => $json['checked']]); | 16 | echo json_encode(['success' => true, 'checked' => $json['checked']]); |
| 17 | die; | 17 | die; |
| 18 | } | 18 | } |
| 19 | static public function setEmailsRetentionPeriod(EntityManager $entityManager, array $json): void | ||
| 20 | { | ||
| 21 | $form_data = $entityManager->find('App\Entity\NodeData', $json['id']); | ||
| 22 | $form_data->updateData('retention_period', (int)$json['months']); | ||
| 23 | $entityManager->persist($form_data); | ||
| 24 | $entityManager->flush(); | ||
| 25 | echo json_encode(['success' => true, 'months' => $json['months']]); | ||
| 26 | die; | ||
| 27 | } | ||
| 19 | static public function setEmailParam(EntityManager $entityManager, array $json): void | 28 | static public function setEmailParam(EntityManager $entityManager, array $json): void |
| 20 | { | 29 | { |
| 21 | $form = new FormValidation($json, 'email_params'); | 30 | $form = new FormValidation($json, 'email_params'); |
