public function Adorable::generateUri in Avatar Kit 8
Creates a URI to an avatar.
Parameters
\Drupal\Core\Session\AccountInterface $account: A user account.
Return value
string URI to an image file.
Overrides AvatarGeneratorBase::generateUri
File
- avatars_adorable/
src/ Plugin/ AvatarGenerator/ Adorable.php, line 26
Class
- Adorable
- Adorable.io avatar generator.
Namespace
Drupal\avatars_adorable\Plugin\AvatarGeneratorCode
public function generateUri(AccountInterface $account) {
$api = new AdorableAPI();
return $api
->setIdentifier($this
->getIdentifier($account))
->setDimensions(256)
->getUrl();
}