You are here

public function ProraterManager::__construct in Commerce Recurring Framework 8

Constructs a new ProraterManager 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/ProraterManager.php, line 30

Class

ProraterManager
Manages discovery and instantiation of prorater plugins.

Namespace

Drupal\commerce_recurring

Code

public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
  parent::__construct('Plugin/Commerce/Prorater', $namespaces, $module_handler, ProraterInterface::class, CommerceProrater::class);
  $this
    ->alterInfo('commerce_prorater_info');
  $this
    ->setCacheBackend($cache_backend, 'commerce_prorater_plugins');
}