Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
novicell/custom_forms / modules / payment / src / CustomFormsPaymentMethodManager.php
Size: Mime:
<?php

namespace Drupal\custom_forms_payment;

use Drupal\Core\Plugin\DefaultPluginManager;
use Drupal\Core\Cache\CacheBackendInterface;
use Drupal\Core\Extension\ModuleHandlerInterface;

/**
 * Provides an Custom forms payment method plugin manager.
 *
 * @see \Drupal\custom_forms_payment\CustomFormsPaymentMethodManager
 * @see \Drupal\custom_forms_payment\Plugin\CustomForms\PaymentMethod\CustomFormsPaymentMethodInterface
 * @see plugin_api
 */
class CustomFormsPaymentMethodManager extends DefaultPluginManager {

  /**
   * Constructs a CustomFormsPaymentMethodManager object.
   *
   * @param \Traversable $namespaces
   *   An object that implements \Traversable which contains the root paths
   *   keyed by the corresponding namespace to look for plugin implementations.
   * @param \Drupal\Core\Cache\CacheBackendInterface $cache_backend
   *   Cache backend instance to use.
   * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
   *   The module handler to invoke the alter hook with.
   */
  public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
    parent::__construct(
      'Plugin/CustomForms/PaymentMethod',
      $namespaces,
      $module_handler,
      'Drupal\custom_forms_payment\Plugin\CustomForms\PaymentMethod\CustomFormsPaymentMethodInterface',
      'Drupal\custom_forms_payment\Annotation\CustomFormsPaymentMethod'
    );
    $this->alterInfo('custom_forms__payment_method');
    $this->setCacheBackend($cache_backend, 'custom_forms_payment_method');
  }
}