public function ProductRouteContext::__construct in Commerce Core 8.2
Constructs a new ProductRouteContext object.
Parameters
\Drupal\Core\Routing\RouteMatchInterface $route_match: The route match.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
File
- modules/
product/ src/ ContextProvider/ ProductRouteContext.php, line 45
Class
- ProductRouteContext
- Sets the current product as context on commerce_product routes.
Namespace
Drupal\commerce_product\ContextProviderCode
public function __construct(RouteMatchInterface $route_match, EntityTypeManagerInterface $entity_type_manager) {
$this->routeMatch = $route_match;
$this->entityTypeManager = $entity_type_manager;
}