You are here

public function CartLinkTokenInterface::needsCsrfProtection 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::needsCsrfProtection()

Checks whether the given user account needs CSRF protection.

Parameters

\Drupal\Core\Session\AccountInterface $account: The user account. If left NULL, the current user will be taken.

Return value

bool TRUE, if add to cart and wishlist links should be CSRF protected, FALSE otherwise.

1 method overrides CartLinkTokenInterface::needsCsrfProtection()
CartLinkToken::needsCsrfProtection in src/CartLinkToken.php
Checks whether the given user account needs CSRF protection.

File

src/CartLinkTokenInterface.php, line 51

Class

CartLinkTokenInterface
Provides the cart link token interface.

Namespace

Drupal\commerce_add_to_cart_link

Code

public function needsCsrfProtection(AccountInterface $account = NULL);