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 formatter.

mixed $plugin_definition: The plugin implementation definition.

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

array $settings: The formatter settings.

string $label: The formatter label display setting.

string $view_mode: The view mode.

array $third_party_settings: Any third party settings.

Overrides FormatterBase::__construct

File

modules/payment_form/src/Plugin/Field/FieldFormatter/PaymentForm.php, line 74

Class

PaymentForm
Formats payment form fields.

Namespace

Drupal\payment_form\Plugin\Field\FieldFormatter

Code

public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, array $third_party_settings, RequestStack $request_stack, EntityFormBuilderInterface $entity_form_builder, EntityStorageInterface $payment_storage, PaymentLineItemManagerInterface $payment_line_item_manager) {
  parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $label, $view_mode, $third_party_settings);
  $this->entityFormBuilder = $entity_form_builder;
  $this->paymentLineItemManager = $payment_line_item_manager;
  $this->paymentStorage = $payment_storage;
  $this->requestStack = $request_stack;
}