You are here

public function AvatarKitDownloadUtility::__construct in Avatar Kit 8.2

Creates a new AvatarKitDownloadUtility instance.

Parameters

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

\Drupal\Core\File\FileSystemInterface $fileSystem: The file system service.

\Drupal\file\FileUsage\FileUsageInterface $fileUsage: The file usage service.

\GuzzleHttp\Client $httpClient: The Guzzle HTTP middleware.

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

File

src/AvatarKitDownloadUtility.php, line 68

Class

AvatarKitDownloadUtility
Utility for creating Drupal files from responses.

Namespace

Drupal\avatars

Code

public function __construct(EntityTypeManagerInterface $entityTypeManager, FileSystemInterface $fileSystem, FileUsageInterface $fileUsage, Client $httpClient, LoggerInterface $logger) {
  $this->fileStorage = $entityTypeManager
    ->getStorage('file');
  $this->fileSystem = $fileSystem;
  $this->fileUsage = $fileUsage;
  $this->httpClient = $httpClient;
  $this->logger = $logger;
}