public function AvatarKitEntityPreferenceManager::__construct in Avatar Kit 8.2
Creates a new AvatarKitEntityPreferenceManager object.
Parameters
\Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher: The event dispatcher.
\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager: The entity type manager.
\Drupal\Core\Cache\CacheBackendInterface $preferenceCacheBackend: The avatar service preference cache backend.
File
- src/
AvatarKitEntityPreferenceManager.php, line 48
Class
- AvatarKitEntityPreferenceManager
- Manages order in which services should be fetched for entities.
Namespace
Drupal\avatarsCode
public function __construct(EventDispatcherInterface $eventDispatcher, EntityTypeManagerInterface $entityTypeManager, CacheBackendInterface $preferenceCacheBackend) {
$this->eventDispatcher = $eventDispatcher;
$this->serviceStorage = $entityTypeManager
->getStorage('avatars_service');
$this->preferenceCacheBackend = $preferenceCacheBackend;
}