You are here

public function AvatarKitLocalCacheInterface::cacheLocalFileEntity in Avatar Kit 8.2

Creates an avatar cache entity by linking a pre-existing file entity.

Parameters

string $service_id: An avatar service ID.

string $uri: The URL of an file stored locally.

\Drupal\avatars\EntityAvatarIdentifierInterface $identifier: An entity avatar identifier.

Return value

\Drupal\avatars\Entity\AvatarCacheInterface|null An avatar cache entity, or NULL if no pre-existing file entity exists with provided URI.

1 method overrides AvatarKitLocalCacheInterface::cacheLocalFileEntity()
AvatarKitLocalCache::cacheLocalFileEntity in src/AvatarKitLocalCache.php
Creates an avatar cache entity by linking a pre-existing file entity.

File

src/AvatarKitLocalCacheInterface.php, line 40

Class

AvatarKitLocalCacheInterface
Cache remote files locally into file entities.

Namespace

Drupal\avatars

Code

public function cacheLocalFileEntity(string $service_id, string $uri, EntityAvatarIdentifierInterface $identifier) : ?AvatarCacheInterface;