public function CartCacheContext::__construct in Commerce Core 8.2
Constructs a new CartCacheContext object.
Parameters
\Drupal\Core\Session\AccountInterface $account: The current user account.
\Drupal\commerce_cart\CartProviderInterface $cart_provider: The cart provider service.
File
- modules/
cart/ src/ Cache/ Context/ CartCacheContext.php, line 39
Class
- CartCacheContext
- Defines the CartCacheContext service, for "per cart" caching.
Namespace
Drupal\commerce_cart\Cache\ContextCode
public function __construct(AccountInterface $account, CartProviderInterface $cart_provider) {
$this->account = $account;
$this->cartProvider = $cart_provider;
}