Created
December 20, 2012 17:46
-
-
Save jmather/4347146 to your computer and use it in GitHub Desktop.
How to make VichUploaderBundle change an image
This file contains 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
public function setProfileImage($profile_image) | |
{ | |
$this->profile_image = $profile_image; | |
if ($profile_image instanceof UploadedFile) { | |
$this->setUpdatedAt(new \DateTime()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment