You are here

public function WishlistItemRouteProvider::getRoutes in Commerce Wishlist 8.3

Provides routes for entities.

Parameters

\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type

Return value

\Symfony\Component\Routing\RouteCollection|\Symfony\Component\Routing\Route[] Returns a route collection or an array of routes keyed by name, like route_callbacks inside 'routing.yml' files.

Overrides AdminHtmlRouteProvider::getRoutes

File

src/WishlistItemRouteProvider.php, line 18

Class

WishlistItemRouteProvider
Provides routes for the wishlist item entity.

Namespace

Drupal\commerce_wishlist

Code

public function getRoutes(EntityTypeInterface $entity_type) {
  $collection = parent::getRoutes($entity_type);
  if ($details_form_route = $this
    ->getDetailsFormRoute($entity_type)) {
    $collection
      ->add('entity.commerce_wishlist_item.details_form', $details_form_route);
  }
  return $collection;
}