You are here

public function ConditionsWidget::__construct in Commerce Core 8.2

Constructs a ConditionsWidget 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\ConditionManagerInterface $condition_manager: The condition manager.

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

Overrides WidgetBase::__construct

File

src/Plugin/Field/FieldWidget/ConditionsWidget.php, line 60

Class

ConditionsWidget
Plugin implementation of the 'commerce_conditions' widget.

Namespace

Drupal\commerce\Plugin\Field\FieldWidget

Code

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