You are here

public function EmailEventManager::__construct in Commerce Email 8

Constructs a new EmailEventManager 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: The cache backend.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.

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

Overrides DefaultPluginManager::__construct

File

src/EmailEventManager.php, line 41

Class

EmailEventManager
Manages discovery and instantiation of condition plugins.

Namespace

Drupal\commerce_email

Code

public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler, EntityTypeManagerInterface $entity_type_manager) {
  parent::__construct('Plugin/Commerce/EmailEvent', $namespaces, $module_handler, EmailEventInterface::class, CommerceEmailEvent::class);
  $this
    ->alterInfo('commerce_email_event_info');
  $this
    ->setCacheBackend($cache_backend, 'commerce_email_event_plugins');
  $this->entityTypeManager = $entity_type_manager;
}