public function AvatarManager::notifyDynamicChange in Avatar Kit 8
Triggers expected change for dynamic avatar generator.
Parameters
\Drupal\avatars\AvatarGeneratorInterface $avatar_generator: An avatar generator instance.
\Drupal\user\UserInterface $user: A user entity.
Overrides AvatarManagerInterface::notifyDynamicChange
File
- src/
AvatarManager.php, line 268
Class
- AvatarManager
- Provides an avatar manager service.
Namespace
Drupal\avatarsCode
public function notifyDynamicChange(AvatarGeneratorInterface $avatar_generator, UserInterface $user) {
if ($avatar_preview = AvatarPreview::getAvatarPreview($avatar_generator, $user)) {
$avatar_preview
->delete();
}
}