public function ProductVariationAttributesWidget::__construct in Commerce Core 8.2
Constructs a new ProductVariationAttributesWidget 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\Core\Entity\EntityRepositoryInterface $entity_repository: The entity repository.
\Drupal\commerce_product\ProductAttributeFieldManagerInterface $attribute_field_manager: The product attribute field manager.
\Drupal\commerce_product\ProductVariationAttributeMapperInterface $variation_attribute_mapper: The product variation attribute mapper.
Overrides ProductVariationWidgetBase::__construct
File
- modules/
product/ src/ Plugin/ Field/ FieldWidget/ ProductVariationAttributesWidget.php, line 66
Class
- ProductVariationAttributesWidget
- Plugin implementation of the 'commerce_product_variation_attributes' widget.
Namespace
Drupal\commerce_product\Plugin\Field\FieldWidgetCode
public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings, EntityTypeManagerInterface $entity_type_manager, EntityRepositoryInterface $entity_repository, ProductAttributeFieldManagerInterface $attribute_field_manager, ProductVariationAttributeMapperInterface $variation_attribute_mapper) {
parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $third_party_settings, $entity_type_manager, $entity_repository);
$this->attributeFieldManager = $attribute_field_manager;
$this->variationAttributeMapper = $variation_attribute_mapper;
}