public function AvatarManager::__construct in Avatar Kit 8
Constructs a new AvatarManager object.
Parameters
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory service.
\GuzzleHttp\ClientInterface $http_client: The Guzzle HTTP client.
\Drupal\Core\Cache\CacheTagsInvalidatorInterface $cache_tag_invalidator: The cache tag invalidator.
\Drupal\Core\Logger\LoggerChannelFactoryInterface $logger_factory: The logger channel factory.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
\Drupal\file\FileUsage\FileUsageInterface $file_usage: The file usage service.
\Drupal\avatars\AvatarGeneratorPluginManagerInterface $avatar_generator: The avatar generator plugin manager.
File
- src/
AvatarManager.php, line 94
Class
- AvatarManager
- Provides an avatar manager service.
Namespace
Drupal\avatarsCode
public function __construct(ConfigFactoryInterface $config_factory, ClientInterface $http_client, CacheTagsInvalidatorInterface $cache_tag_invalidator, LoggerChannelFactoryInterface $logger_factory, EntityTypeManagerInterface $entity_type_manager, FileUsageInterface $file_usage, AvatarGeneratorPluginManagerInterface $avatar_generator) {
$this->configFactory = $config_factory;
$this->httpClient = $http_client;
$this->cacheTagInvalidator = $cache_tag_invalidator;
$this->loggerFactory = $logger_factory;
$this->avatarGeneratorStorage = $entity_type_manager
->getStorage('avatar_generator');
$this->fileUsage = $file_usage;
$this->avatarGenerator = $avatar_generator;
}