*/
private $title;
- /**
- * @var string
- */
- private $short;
-
/**
* @var string
*/
* Constructor
*/
public function __construct() {
+ //Set defaults
+ $this->created = new \DateTime('now');
+ $this->updated = new \DateTime('now');
$this->sessions = new ArrayCollection();
$this->snippets = new ArrayCollection();
$this->users = new ArrayCollection();
return $this->title;
}
- /**
- * Set short
- *
- * @param string $short
- *
- * @return Location
- */
- public function setShort(string $short): Location {
- $this->short = $short;
-
- return $this;
- }
-
- /**
- * Get short
- *
- * @return string
- */
- public function getShort(): string {
- return $this->short;
- }
-
/**
* Set address
*
*/
public function preUpdate(PreUpdateEventArgs $eventArgs) {
//Check that we have a location instance
- if (($user = $eventArgs->getEntity()) instanceof Location) {
+ if (($location = $eventArgs->getEntity()) instanceof Location) {
//Set updated value
- $user->setUpdated(new \DateTime('now'));
+ $location->setUpdated(new \DateTime('now'));
}
}