You are here

public function SingleVariationWidget::__construct in Commerce Core 8.2

Constructs a new SingleVariationWidget object.

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.

array $settings: The widget settings.

array $third_party_settings: Any third party settings.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

\Drupal\commerce\InlineFormManager $inline_form_manager: The inline form manager.

Overrides WidgetBase::__construct

File

modules/product/src/Plugin/Field/FieldWidget/SingleVariationWidget.php, line 61

Class

SingleVariationWidget
Plugin implementation of the 'commerce_product_single_variation' widget.

Namespace

Drupal\commerce_product\Plugin\Field\FieldWidget

Code

public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings, EntityTypeManagerInterface $entity_type_manager, InlineFormManager $inline_form_manager) {
  parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $third_party_settings);
  $this->entityTypeManager = $entity_type_manager;
  $this->inlineFormManager = $inline_form_manager;
}