You are here

public function StaticTestGenerator::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/StaticTestGenerator.php, line 26

Class

StaticTestGenerator
Static test avatar generator.

Namespace

Drupal\avatars_test\Plugin\AvatarGenerator

Code

public function generateUri(AccountInterface $account) {
  return Url::fromRoute('avatars_test.image', [], [
    'absolute' => TRUE,
  ])
    ->toString();
}