public function DynamicTestGenerator::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
- tests/
modules/ avatars_test/ src/ Plugin/ AvatarGenerator/ DynamicTestGenerator.php, line 26
Class
- DynamicTestGenerator
- Dynamic test avatar generator.
Namespace
Drupal\avatars_test\Plugin\AvatarGeneratorCode
public function generateUri(AccountInterface $account) {
return Url::fromRoute('avatars_test.image')
->setAbsolute()
->toString();
}