You are here

public function ProductBundleItemsWidget::__construct in Commerce Product Bundle 8

Constructs a new ProductBundleItemsWidget 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_product\ProductAttributeFieldManagerInterface $attribute_field_manager: The attribute field manager.

Overrides ProductBundleWidgetBase::__construct

File

src/Plugin/Field/FieldWidget/ProductBundleItemsWidget.php, line 73

Class

ProductBundleItemsWidget
Plugin implementation of the 'commerce_product_bundle_items' widget.

Namespace

Drupal\commerce_product_bundle\Plugin\Field\FieldWidget

Code

public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings, EntityTypeManagerInterface $entity_type_manager, ProductAttributeFieldManagerInterface $attribute_field_manager) {
  parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $third_party_settings, $entity_type_manager);
  $this->attributeStorage = $entity_type_manager
    ->getStorage('commerce_product_attribute');
  $this->attributeFieldManager = $attribute_field_manager;
}