You are here

public static function MolliePaymentDeriver::create in Mollie Payment 8.2

Creates a new class instance.

Parameters

\Symfony\Component\DependencyInjection\ContainerInterface $container: The container to pull out services used in the fetcher.

string $base_plugin_id: The base plugin ID for the plugin ID.

Return value

static Returns an instance of this fetcher.

Overrides ContainerDeriverInterface::create

File

src/Plugin/Payment/Method/MolliePaymentDeriver.php, line 43

Class

MolliePaymentDeriver
Derives payment method plugin definitions based on configuration entities.

Namespace

Drupal\mollie_payment\Plugin\Payment\Method

Code

public static function create(ContainerInterface $container, $base_plugin_id) {

  /** @var \Drupal\Core\Entity\EntityManagerInterface $entity_manager */
  $entity_manager = $container
    ->get('entity.manager');
  return new static($entity_manager
    ->getStorage('payment_method_configuration'), $container
    ->get('plugin.manager.payment.method_configuration'));
}