public function ProductBreadcrumbBuilder::__construct in Commerce Demo 8
Constructs a new ProductBreadcrumbBuilder object.
Parameters
\Drupal\pathauto\AliasCleanerInterface $alias_cleaner: The alias cleaner.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
\Drupal\Core\Routing\RouteProviderInterface $route_provider: The route provider.
Throws
\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
\Drupal\Component\Plugin\Exception\PluginNotFoundException
File
- src/
ProductBreadcrumbBuilder.php, line 60
Class
- ProductBreadcrumbBuilder
- Builds a product breadcrumb based on the "field_product_categories" field.
Namespace
Drupal\commerce_demoCode
public function __construct(AliasCleanerInterface $alias_cleaner, EntityTypeManagerInterface $entity_type_manager, RouteProviderInterface $route_provider) {
$this->aliasCleaner = $alias_cleaner;
$this->facetStorage = $entity_type_manager
->getStorage('facets_facet');
$this->routeProvider = $route_provider;
}