class Avatar (View source)

deprecated \@package Concrete\Core\Application\Service

Class Avatar.

Methods

string
outputUserAvatar(UserInfo $uo, bool $suppressNone = false, float $aspectRatio = 1.0)

No description

bool|string
getImagePath(UserInfo $uo, bool $withNoCacheStr = true)

gets the image path for a users avatar.

string
outputNoAvatar(float $aspectRatio = 1.0)

What to show if the user has no avatar.

removeAvatar(User $ui)

Removes the avatar for the given user.

string
getGravatar(string $email, int $s = 80, string $d = 'mm', string $r = 'g', bool $img = false, array $atts = array()) deprecated

Get either a Gravatar URL or complete image tag for a specified email address.

string
get_gravatar($email, int $s = 80, string $d = 'mm', string $r = 'g', bool $img = false, array $atts = array()) deprecated

No description

Details

string outputUserAvatar(UserInfo $uo, bool $suppressNone = false, float $aspectRatio = 1.0)

No description

Parameters

UserInfo $uo
bool $suppressNone
float $aspectRatio

Return Value

string

bool|string getImagePath(UserInfo $uo, bool $withNoCacheStr = true)

gets the image path for a users avatar.

Parameters

UserInfo $uo
bool $withNoCacheStr

Return Value

bool|string

$src

string outputNoAvatar(float $aspectRatio = 1.0)

What to show if the user has no avatar.

Parameters

float $aspectRatio

Return Value

string

$str

removeAvatar(User $ui)

Removes the avatar for the given user.

Parameters

User $ui

string getGravatar(string $email, int $s = 80, string $d = 'mm', string $r = 'g', bool $img = false, array $atts = array()) deprecated

deprecated

Get either a Gravatar URL or complete image tag for a specified email address.

Parameters

string $email

The email address

int $s

Size in pixels, defaults to 80px [ 1 - 512 ]

string $d

Default imageset to use [ 404 | mm | identicon | monsterid | wavatar ]

string $r

Maximum rating (inclusive) [ g | pg | r | x ]

bool $img

True to return a complete IMG tag False for just the URL

array $atts

Optional, additional key/value attributes to include in the IMG tag

Return Value

string

containing either just a URL or a complete image tag

string get_gravatar($email, int $s = 80, string $d = 'mm', string $r = 'g', bool $img = false, array $atts = array()) deprecated

deprecated

No description

Parameters

$email
int $s
string $d
string $r
bool $img
array $atts

Return Value

string