You are here

public function UnitPriceWidget::__construct in Commerce Core 8.2

Constructs a new UnitPriceWidget 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\commerce_price\Resolver\ChainPriceResolverInterface $price_resolver: The chain price resolver.

Overrides WidgetBase::__construct

File

modules/order/src/Plugin/Field/FieldWidget/UnitPriceWidget.php, line 55

Class

UnitPriceWidget
Plugin implementation of the 'commerce_unit_price' widget.

Namespace

Drupal\commerce_order\Plugin\Field\FieldWidget

Code

public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings, ChainPriceResolverInterface $price_resolver) {
  parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $third_party_settings);
  $this->chainPriceResolver = $price_resolver;
}