Created
April 26, 2013 08:18
-
-
Save jp1987/5465712 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @ORM\PreUpdate | |
* @return void | |
*/ | |
public function preUpdate() { | |
$this->setChangedDate(new \DateTime()); | |
} | |
/** | |
* @ORM\PrePersist | |
* @return void | |
*/ | |
public function prePersist() { | |
$this->setCreationDate(new \DateTime()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment