public function AvatarManagerInterface::findValidAvatar in Avatar Kit 8
Go down the the avatar generator preference hierarchy for a user.
Loads each avatar until a valid avatar is found.
Parameters
\Drupal\user\UserInterface $user: A user entity.
Return value
\Drupal\avatars\AvatarPreviewInterface|null An avatar preview entity.
1 method overrides AvatarManagerInterface::findValidAvatar()
- AvatarManager::findValidAvatar in src/
AvatarManager.php - Go down the the avatar generator preference hierarchy for a user.
File
- src/
AvatarManagerInterface.php, line 32
Class
- AvatarManagerInterface
- Provides an interface to the avatar manager service.
Namespace
Drupal\avatarsCode
public function findValidAvatar(UserInterface $user);