You are here

public function AddToWishlistController::__construct in Commerce Add To Cart Link 8

Same name and namespace in other branches
  1. 2.x modules/wishlist/src/Controller/AddToWishlistController.php \Drupal\commerce_add_to_wishlist_link\Controller\AddToWishlistController::__construct()

Constructs a new AddToWishlistController object.

Parameters

\Drupal\commerce_add_to_cart_link\CartLinkTokenInterface $cart_link_token: The cart link token service.

\Drupal\commerce_wishlist\WishlistManagerInterface $wishlist_manager: The wishlist manager.

\Drupal\commerce_wishlist\WishlistProviderInterface $wishlist_provider: The wishlist provider.

File

modules/wishlist/src/Controller/AddToWishlistController.php, line 53

Class

AddToWishlistController
Defines the add to wishlist controller.

Namespace

Drupal\commerce_add_to_wishlist_link\Controller

Code

public function __construct(CartLinkTokenInterface $cart_link_token, WishlistManagerInterface $wishlist_manager, WishlistProviderInterface $wishlist_provider) {
  $this->cartLinkToken = $cart_link_token;
  $this->wishlistManager = $wishlist_manager;
  $this->wishlistProvider = $wishlist_provider;
}