class AvatarUploader

Properties

protected Filesystem $uploadDir

Methods

__construct(Factory $filesystemFactory)

No description

void
upload(User $user, ImageInterface $image)

No description

void
removeFileAfterSave(User $user)

Handle the removal of the old avatar file after a successful user save We don't place this in remove() because otherwise we would call changeAvatarPath 2 times when uploading.

void
remove(User $user)

No description

Details

__construct(Factory $filesystemFactory)

Parameters

Factory $filesystemFactory

void upload(User $user, ImageInterface $image)

Parameters

User $user
ImageInterface $image

Return Value

void

protected void removeFileAfterSave(User $user)

Handle the removal of the old avatar file after a successful user save We don't place this in remove() because otherwise we would call changeAvatarPath 2 times when uploading.

Parameters

User $user

Return Value

void

void remove(User $user)

Parameters

User $user

Return Value

void