*/
private $application;
- /**
- * @var Dance
- */
- private $dance;
-
/**
* @var Location
*/
* Constructor
*/
public function __construct() {
+ //Set defaults
$this->begin = null;
$this->start = null;
$this->length = null;
$this->stop = null;
+ $this->premium = null;
$this->rainfall = null;
$this->rainrisk = null;
$this->realfeel = null;
$this->temperaturemin = null;
$this->temperaturemax = null;
$this->locked = null;
- $this->premium = null;
+ $this->created = new \DateTime('now');
+ $this->updated = new \DateTime('now');
$this->applications = new ArrayCollection();
}
return $this->applications;
}
- /**
- * Set dance
- *
- * @param Dance $dance
- *
- * @return Session
- */
- public function setDance(Dance $dance): Session {
- $this->dance = $dance;
-
- return $this;
- }
-
- /**
- * Get dance
- *
- * @return Dance
- */
- public function getDance(): Dance {
- return $this->dance;
- }
-
/**
* Set location
*
*/
public function preUpdate(PreUpdateEventArgs $eventArgs) {
//Check that we have a session instance
- if (($user = $eventArgs->getEntity()) instanceof Session) {
+ if (($session = $eventArgs->getEntity()) instanceof Session) {
//Set updated value
- $user->setUpdated(new \DateTime('now'));
+ $session->setUpdated(new \DateTime('now'));
}
}