You are here

public function AvatarKitEntityHandlerInterface::findFirst in Avatar Kit 8.2

Find the first valid avatar for an entity.

Downloads and caches avatars for a user until first success.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: Get the first avatar for this entity.

Return value

\Drupal\avatars\Entity\AvatarCacheInterface|null An avatar cache entity, or NULL if no avatars could be generated for this entity.

1 method overrides AvatarKitEntityHandlerInterface::findFirst()
AvatarKitEntityHandler::findFirst in src/AvatarKitEntityHandler.php
Find the first valid avatar for an entity.

File

src/AvatarKitEntityHandlerInterface.php, line 25

Class

AvatarKitEntityHandlerInterface
Downloads and caches avatars into entities.

Namespace

Drupal\avatars

Code

public function findFirst(EntityInterface $entity) : ?AvatarCacheInterface;