You are here

public function PaymentForm::__construct in Payment 8.2

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

Constructs a new instance.

Parameters

string $plugin_id: The plugin_id for the widget.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The definition of the field to which the widget is associated.

mixed[] $settings: The widget settings.

array[] $third_party_settings: Any third party settings.

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

\Drupal\payment\Plugin\Payment\LineItem\PaymentLineItemManagerInterface $payment_line_item_manager: The payment line item manager.

Overrides WidgetBase::__construct

File

modules/payment_form/src/Plugin/Field/FieldWidget/PaymentForm.php, line 54

Class

PaymentForm
A payment configuration widget.

Namespace

Drupal\payment_form\Plugin\Field\FieldWidget

Code

public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings, TranslationInterface $string_translation, PaymentLineItemManagerInterface $payment_line_item_manager) {
  parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $third_party_settings);
  $this->paymentLineItemManager = $payment_line_item_manager;
  $this->stringTranslation = $string_translation;
}