public function ProductViewBuilder::__construct in Commerce Core 8.2
Constructs a new ProductViewBuilder object.
Parameters
\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type definition.
\Drupal\Core\Entity\EntityRepositoryInterface $entity_repository: The entity repository.
\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager.
\Drupal\Core\Theme\Registry $theme_registry: The theme registry.
\Drupal\Core\Entity\EntityDisplayRepositoryInterface $entity_display_repository: The entity display repository.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
\Drupal\commerce_product\ProductVariationFieldRenderer $variation_field_renderer: The product variation field renderer.
Overrides EntityViewBuilder::__construct
File
- modules/
product/ src/ ProductViewBuilder.php, line 54
Class
- ProductViewBuilder
- Defines the entity view builder for products.
Namespace
Drupal\commerce_productCode
public function __construct(EntityTypeInterface $entity_type, EntityRepositoryInterface $entity_repository, LanguageManagerInterface $language_manager, Registry $theme_registry, EntityDisplayRepositoryInterface $entity_display_repository, EntityTypeManagerInterface $entity_type_manager, ProductVariationFieldRenderer $variation_field_renderer) {
parent::__construct($entity_type, $entity_repository, $language_manager, $theme_registry, $entity_display_repository);
$this->entityTypeManager = $entity_type_manager;
$this->variationFieldRenderer = $variation_field_renderer;
}