You are here

protected function WishlistItemRouteProvider::getCollectionRoute in Commerce Wishlist 8.3

Gets the collection route.

Parameters

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

Return value

\Symfony\Component\Routing\Route|null The generated route, if available.

Overrides DefaultHtmlRouteProvider::getCollectionRoute

File

src/WishlistItemRouteProvider.php, line 102

Class

WishlistItemRouteProvider
Provides routes for the wishlist item entity.

Namespace

Drupal\commerce_wishlist

Code

protected function getCollectionRoute(EntityTypeInterface $entity_type) {
  $route = parent::getCollectionRoute($entity_type);
  $route
    ->setDefault('_title_callback', WishlistItemController::class . '::collectionTitle')
    ->setOption('parameters', [
    'commerce_wishlist' => [
      'type' => 'entity:commerce_wishlist',
    ],
  ]);
  return $route;
}