You are here

public function PaymentMethodManager::__construct in Ubercart 8.4

Constructs a PaymentMethodManager 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.

Overrides DefaultPluginManager::__construct

File

payment/uc_payment/src/Plugin/PaymentMethodManager.php, line 29

Class

PaymentMethodManager
Manages discovery and instantiation of payment methods.

Namespace

Drupal\uc_payment\Plugin

Code

public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
  parent::__construct('Plugin/Ubercart/PaymentMethod', $namespaces, $module_handler, PaymentMethodPluginInterface::class, UbercartPaymentMethod::class);
  $this
    ->alterInfo('uc_payment_method');
  $this
    ->setCacheBackend($cache_backend, 'uc_payment_methods');
}