]> Raphaƫl G. Git Repositories - airbundle/blobdiff - Entity/Dance.php
New icon and logo layout in config
[airbundle] / Entity / Dance.php
index fa07ba9693b153c6323fdb92cc15e29b5dbb9e94..c269f32d196a33dc200c32ad9e75e3809e6595aa 100644 (file)
@@ -52,6 +52,11 @@ class Dance {
         * Constructor
         */
        public function __construct() {
         * 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();
        }
                $this->applications = new ArrayCollection();
                $this->users = new ArrayCollection();
        }
@@ -201,7 +206,7 @@ class Dance {
         * {@inheritdoc}
         */
        public function preUpdate(PreUpdateEventArgs $eventArgs) {
         * {@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'));
                if (($dance = $eventArgs->getEntity()) instanceof Dance) {
                        //Set updated value
                        $dance->setUpdated(new \DateTime('now'));