//Set defaults
$this->created = new \DateTime('now');
$this->updated = new \DateTime('now');
+
+ //Set collections
$this->applications = new ArrayCollection();
$this->users = new ArrayCollection();
}
* {@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'));