You are here

public function CartLinkTokenInterface::validate in Commerce Add To Cart Link 8

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

Checks the given token for the given variation for validity.

Parameters

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

string $token: The token to be validated.

Return value

bool TRUE, if the given token is valid, FALSE otherwise.

1 method overrides CartLinkTokenInterface::validate()
CartLinkToken::validate in src/CartLinkToken.php
Checks the given token for the given variation for validity.

File

src/CartLinkTokenInterface.php, line 40

Class

CartLinkTokenInterface
Provides the cart link token interface.

Namespace

Drupal\commerce_add_to_cart_link

Code

public function validate(ProductVariationInterface $variation, $token);