public function SubscriptionTypeManager::__construct in Commerce Recurring Framework 8
Constructs a new SubscriptionTypeManager 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/
SubscriptionTypeManager.php, line 31
Class
- SubscriptionTypeManager
- Manages discovery and instantiation of subscription type plugins.
Namespace
Drupal\commerce_recurringCode
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
parent::__construct('Plugin/Commerce/SubscriptionType', $namespaces, $module_handler, SubscriptionTypeInterface::class, CommerceSubscriptionType::class);
$this
->alterInfo('commerce_subscription_type_info');
$this
->setCacheBackend($cache_backend, 'commerce_subscription_type_plugins');
}