public function AvatarKitServicePluginManager::__construct in Avatar Kit 8.2
Creates the discovery object.
Parameters
\Traversable $namespaces: An object that implements \Traversable which contains the root paths keyed by the corresponding namespace to look for plugin implementations.
\Drupal\Core\Cache\CacheBackendInterface $cache_backend: Cache backend instance to use.
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.
\Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher: An event dispatcher instance to use for events.
Overrides DefaultPluginManager::__construct
File
- src/
AvatarKitServicePluginManager.php, line 39
Class
- AvatarKitServicePluginManager
- Avatar Kit service plugin manager.
Namespace
Drupal\avatarsCode
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler, EventDispatcherInterface $eventDispatcher) {
parent::__construct('Plugin/Avatars/Service', $namespaces, $module_handler, AvatarKitServiceInterface::class, AvatarKitService::class);
$this
->setCacheBackend($cache_backend, 'avatar_service_plugins');
$this->eventDispatcher = $eventDispatcher;
}