You are here

public function PaymentReference::__construct in Payment 8.2

Same name in this branch
  1. 8.2 modules/payment_reference/src/Element/PaymentReference.php \Drupal\payment_reference\Element\PaymentReference::__construct()
  2. 8.2 modules/payment_reference/src/Plugin/Payment/Type/PaymentReference.php \Drupal\payment_reference\Plugin\Payment\Type\PaymentReference::__construct()
  3. 8.2 modules/payment_reference/src/Plugin/Field/FieldWidget/PaymentReference.php \Drupal\payment_reference\Plugin\Field\FieldWidget\PaymentReference::__construct()

Constructs a new instance.

Parameters

mixed[] $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin_id for the plugin instance.

mixed[] $plugin_definition: The plugin implementation definition.

\Drupal\payment\EventDispatcherInterface $event_dispatcher: The event dispatcher.

\Drupal\Core\Routing\UrlGeneratorInterface $url_generator: The URL generator.

\Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager: The entity field manager.

\Drupal\Core\StringTranslation\TranslationInterface $string_translation: The string translator.

Overrides PaymentTypeBase::__construct

File

modules/payment_reference/src/Plugin/Payment/Type/PaymentReference.php, line 65

Class

PaymentReference
The payment reference field payment type.

Namespace

Drupal\payment_reference\Plugin\Payment\Type

Code

public function __construct(array $configuration, $plugin_id, array $plugin_definition, EventDispatcherInterface $event_dispatcher, UrlGeneratorInterface $url_generator, EntityFieldManagerInterface $entity_field_manager, TranslationInterface $string_translation) {
  $configuration += $this
    ->defaultConfiguration();
  parent::__construct($configuration, $plugin_id, $plugin_definition, $event_dispatcher);
  $this->urlGenerator = $url_generator;
  $this->entityFieldManager = $entity_field_manager;
  $this->stringTranslation = $string_translation;
}