Rapsys Git
/
airbundle
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add default locations_link and locations_title
[airbundle]
/
Entity
/
Slot.php
diff --git
a/Entity/Slot.php
b/Entity/Slot.php
index 10e5b3d6f8bb1c48d996be97b4e72f92029328b6..116c29fcd6576e081fb21d377a8e9d7c808aa783 100644
(file)
--- a/
Entity/Slot.php
+++ b/
Entity/Slot.php
@@
-47,6
+47,9
@@
class Slot {
* Constructor
*/
public function __construct() {
* Constructor
*/
public function __construct() {
+ //Set defaults
+ $this->created = new \DateTime('now');
+ $this->updated = new \DateTime('now');
$this->sessions = new ArrayCollection();
}
$this->sessions = new ArrayCollection();
}
@@
-161,9
+164,9
@@
class Slot {
*/
public function preUpdate(PreUpdateEventArgs $eventArgs) {
//Check that we have a slot instance
*/
public function preUpdate(PreUpdateEventArgs $eventArgs) {
//Check that we have a slot instance
- if (($
user
= $eventArgs->getEntity()) instanceof Slot) {
+ if (($
slot
= $eventArgs->getEntity()) instanceof Slot) {
//Set updated value
//Set updated value
- $
user
->setUpdated(new \DateTime('now'));
+ $
slot
->setUpdated(new \DateTime('now'));
}
}
}
}