You are here

public function LicenseTypeManager::__construct in Commerce License 8.2

Constructs a new LicenseTypeManager 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.

Overrides DefaultPluginManager::__construct

File

src/LicenseTypeManager.php, line 31

Class

LicenseTypeManager
Manages discovery and instantiation of license type plugins.

Namespace

Drupal\commerce_license

Code

public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
  parent::__construct('Plugin/Commerce/LicenseType', $namespaces, $module_handler, LicenseTypeInterface::class, CommerceLicenseType::class);
  $this
    ->alterInfo('commerce_license_type_info');
  $this
    ->setCacheBackend($cache_backend, 'commerce_license_type_plugins');
}