You are here

protected function WishlistItemRouteProvider::getAddFormRoute in Commerce Wishlist 8.3

Gets the add-form 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::getAddFormRoute

File

src/WishlistItemRouteProvider.php, line 55

Class

WishlistItemRouteProvider
Provides routes for the wishlist item entity.

Namespace

Drupal\commerce_wishlist

Code

protected function getAddFormRoute(EntityTypeInterface $entity_type) {
  $route = parent::getAddFormRoute($entity_type);
  $route
    ->setOption('parameters', [
    'commerce_wishlist' => [
      'type' => 'entity:commerce_wishlist',
    ],
  ]);
  return $route;
}