public function SimpleStockLevelWidget::__construct in Commerce Stock 8
Constructs a WidgetBase 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.
Overrides WidgetBase::__construct
File
- modules/
field/ src/ Plugin/ Field/ FieldWidget/ SimpleStockLevelWidget.php, line 48
Class
- SimpleStockLevelWidget
- Plugin implementation of the 'commerce_stock_level' widget.
Namespace
Drupal\commerce_stock_field\Plugin\Field\FieldWidgetCode
public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings, StockServiceManager $simple_stock_manager) {
parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $third_party_settings);
$this->stockServiceManager = $simple_stock_manager;
}