X-Git-Url: https://git.rapsys.eu/.gitweb.cgi/airbundle/blobdiff_plain/40fa570f0ce4fc6b518ab7b6d71fde5bf249cd56..53b0072e189e79e57d31f02e9e4ef00ae53511ff:/Entity/Dance.php diff --git a/Entity/Dance.php b/Entity/Dance.php index fa07ba9..c269f32 100644 --- a/Entity/Dance.php +++ b/Entity/Dance.php @@ -52,6 +52,11 @@ class Dance { * Constructor */ public function __construct() { + //Set defaults + $this->created = new \DateTime('now'); + $this->updated = new \DateTime('now'); + + //Set collections $this->applications = new ArrayCollection(); $this->users = new ArrayCollection(); } @@ -201,7 +206,7 @@ class Dance { * {@inheritdoc} */ public function preUpdate(PreUpdateEventArgs $eventArgs) { - //Check that we have an session instance + //Check that we have a dance instance if (($dance = $eventArgs->getEntity()) instanceof Dance) { //Set updated value $dance->setUpdated(new \DateTime('now'));