aboutsummaryrefslogtreecommitdiff
path: root/src/controller/ContactFormController.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/controller/ContactFormController.php')
-rw-r--r--src/controller/ContactFormController.php9
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');