public function OrderItemProduct::__construct in Commerce Core 8.2
Constructs a new OrderItemProduct object.
Parameters
array $configuration: The plugin configuration, i.e. an array with configuration values keyed by configuration option name.
string $plugin_id: The plugin_id for the plugin instance.
mixed $plugin_definition: The plugin implementation definition.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
\Drupal\commerce\EntityUuidMapperInterface $entity_uuid_mapper: The entity UUID mapper.
Overrides ConditionBase::__construct
File
- modules/
product/ src/ Plugin/ Commerce/ Condition/ OrderItemProduct.php, line 51
Class
- OrderItemProduct
- Provides the product condition for order items.
Namespace
Drupal\commerce_product\Plugin\Commerce\ConditionCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, EntityUuidMapperInterface $entity_uuid_mapper) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->entityTypeManager = $entity_type_manager;
$this->productStorage = $entity_type_manager
->getStorage('commerce_product');
$this->entityUuidMapper = $entity_uuid_mapper;
}