public function AvatarPreview::setUser in Avatar Kit 8
Set associated user.
Parameters
\Drupal\user\UserInterface $user: A user entity.
Return value
\Drupal\avatars\AvatarPreviewInterface Return avatar preview for chaining.
Overrides AvatarPreviewInterface::setUser
File
- src/
Entity/ AvatarPreview.php, line 53
Class
- AvatarPreview
- Defines the avatar preview entity.
Namespace
Drupal\avatars\EntityCode
public function setUser(UserInterface $user) {
$this
->set('uid', [
'entity' => $user,
]);
return $this;
}