You are here

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

Same name and namespace in other branches
  1. 2.x src/AddToCartLink.php \Drupal\commerce_add_to_cart_link\AddToCartLink::__construct()

Constructs a new AddToCartLink object.

Parameters

\Drupal\commerce_product\Entity\ProductVariationInterface $variation: The product variation.

File

src/AddToCartLink.php, line 28

Class

AddToCartLink
Defines a helper class for constructing add to cart links.

Namespace

Drupal\commerce_add_to_cart_link

Code

public function __construct(ProductVariationInterface $variation) {
  $this->variation = $variation;
}