You are here

public function AvatarKitLocalCache::__construct in Avatar Kit 8.2

Creates a new AvatarKitLocalCache instance.

Parameters

\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager: The entity type manager.

\Psr\Log\LoggerInterface $logger: The logger service.

\Drupal\avatars\AvatarKitDownloadUtilityInterface $downloadUtility: The download utility.

File

src/AvatarKitLocalCache.php, line 53

Class

AvatarKitLocalCache
Cache remote files locally into file entities.

Namespace

Drupal\avatars

Code

public function __construct(EntityTypeManagerInterface $entityTypeManager, LoggerInterface $logger, AvatarKitDownloadUtilityInterface $downloadUtility) {
  $this->avatarCacheStorage = $entityTypeManager
    ->getStorage('avatars_avatar_cache');
  $this->fileStorage = $entityTypeManager
    ->getStorage('file');
  $this->logger = $logger;
  $this->downloadUtility = $downloadUtility;
}