]> Raphaël G. Git Repositories - airbundle/commitdiff
Add defaults
authorRaphaël Gertz <git@rapsys.eu>
Sat, 28 Aug 2021 07:56:58 +0000 (09:56 +0200)
committerRaphaël Gertz <git@rapsys.eu>
Sat, 28 Aug 2021 07:56:58 +0000 (09:56 +0200)
Entity/Slot.php
Entity/Snippet.php

index c5fcd86771529d784deea742fc2c368fb4253755..116c29fcd6576e081fb21d377a8e9d7c808aa783 100644 (file)
@@ -47,6 +47,9 @@ class Slot {
         * Constructor
         */
        public function __construct() {
+               //Set defaults
+               $this->created = new \DateTime('now');
+               $this->updated = new \DateTime('now');
                $this->sessions = new ArrayCollection();
        }
 
index 4e9d406c2b10572a3e48a29c6e59a0cc1d6a4c5f..ee5b262e78f600007529b2d12b5782463324ec05 100644 (file)
@@ -96,6 +96,7 @@ class Snippet {
         * Constructor
         */
        public function __construct() {
+               //Set defaults
                $this->description = null;
                $this->class = null;
                $this->short = null;
@@ -105,6 +106,9 @@ class Snippet {
                $this->donate = null;
                $this->link = null;
                $this->profile = null;
+               $this->created = new \DateTime('now');
+               $this->updated = new \DateTime('now');
+               $this->location = null;
        }
 
        /**