From 97263e96c3afcc257b9c69da92ef58e9c4452096 Mon Sep 17 00:00:00 2001 From: afornerot Date: Sat, 23 Nov 2024 16:52:11 +0100 Subject: [PATCH] default submittime --- src/Controller/IllustrationController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Controller/IllustrationController.php b/src/Controller/IllustrationController.php index cadfd09..88667d1 100755 --- a/src/Controller/IllustrationController.php +++ b/src/Controller/IllustrationController.php @@ -9,6 +9,7 @@ use Symfony\Component\Form\FormError; use App\Entity\Illustration as Entity; use App\Form\IllustrationType as Form; +use DateTime; class IllustrationController extends AbstractController { @@ -57,6 +58,7 @@ class IllustrationController extends AbstractController // Initialisation de l'enregistrement $em = $this->getDoctrine()->getManager(); $data = new Entity(); + $data->setSubmittime(new DateTime()); // Permission if(!$this->getUser()->hasRole("ROLE_ADMIN")&&($by=="admin"||$by=="update")) {