class AvatarModel extends AliasModel implements NamedModel

A Model that has a URL, an alias, and an avatar

Constants

AVATAR_LOCATION

The location where avatars will be stored

Methods

setAvatarFile(File|null $file)

Set the avatar of the object to be a specific file

string
getAvatar(bool $url = false)

Get the path for the image used as the object's avatar

setAvatar(string $avatar)

Change the avatar of the object

resetAvatar()

Reset the object's avatar to an identicon

Details

at line line 57
AvatarModel setAvatarFile(File|null $file)

Set the avatar of the object to be a specific file

Parameters

File|null $file The avatar file

Return Value

AvatarModel

at line line 82
string getAvatar(bool $url = false)

Get the path for the image used as the object's avatar

Parameters

bool $url Whether to return an absolute URL

Return Value

string The path for the avatar

at line line 101
AvatarModel setAvatar(string $avatar)

Change the avatar of the object

Parameters

string $avatar The file name of the avatar

Return Value

AvatarModel

at line line 122
AvatarModel resetAvatar()

Reset the object's avatar to an identicon

Return Value

AvatarModel