You are here

public function CartLinkTokenInterface::generate in Commerce Add To Cart Link 2.x

Same name and namespace in other branches
  1. 8 src/CartLinkTokenInterface.php \Drupal\commerce_add_to_cart_link\CartLinkTokenInterface::generate()

Generates a token for the given product variation.

The token is added to the add to cart link.

Parameters

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

Return value

string The generated token.

1 method overrides CartLinkTokenInterface::generate()
CartLinkToken::generate in src/CartLinkToken.php
Generates a token for the given product variation.

File

src/CartLinkTokenInterface.php, line 27

Class

CartLinkTokenInterface
Provides the cart link token interface.

Namespace

Drupal\commerce_add_to_cart_link

Code

public function generate(ProductVariationInterface $variation);