You are here

public function AvatarPreviewInterface::setAvatar in Avatar Kit 8

Set associated avatar file.

Parameters

\Drupal\file\FileInterface|null $file: A file entity, or NULL if the generator did not create an avatar.

Return value

\Drupal\avatars\AvatarPreviewInterface Return avatar preview for chaining.

1 method overrides AvatarPreviewInterface::setAvatar()
AvatarPreview::setAvatar in src/Entity/AvatarPreview.php
Set associated avatar file.

File

src/AvatarPreviewInterface.php, line 116

Class

AvatarPreviewInterface
Provides an interface for the avatar preview entity.

Namespace

Drupal\avatars

Code

public function setAvatar(FileInterface $file = NULL);