default submittime

This commit is contained in:
afornerot 2024-11-23 16:52:11 +01:00
parent 340e99dad2
commit 97263e96c3
1 changed files with 2 additions and 0 deletions

View File

@ -9,6 +9,7 @@ use Symfony\Component\Form\FormError;
use App\Entity\Illustration as Entity; use App\Entity\Illustration as Entity;
use App\Form\IllustrationType as Form; use App\Form\IllustrationType as Form;
use DateTime;
class IllustrationController extends AbstractController class IllustrationController extends AbstractController
{ {
@ -57,6 +58,7 @@ class IllustrationController extends AbstractController
// Initialisation de l'enregistrement // Initialisation de l'enregistrement
$em = $this->getDoctrine()->getManager(); $em = $this->getDoctrine()->getManager();
$data = new Entity(); $data = new Entity();
$data->setSubmittime(new DateTime());
// Permission // Permission
if(!$this->getUser()->hasRole("ROLE_ADMIN")&&($by=="admin"||$by=="update")) { if(!$this->getUser()->hasRole("ROLE_ADMIN")&&($by=="admin"||$by=="update")) {