Skip to content

Instantly share code, notes, and snippets.

@jmather
Created December 20, 2012 17:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmather/4347146 to your computer and use it in GitHub Desktop.
Save jmather/4347146 to your computer and use it in GitHub Desktop.
How to make VichUploaderBundle change an image
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