private function CartTokenSession::setTokenCartData in Commerce Cart API 8
Set the token cart data.
Parameters
array $data: The data.
2 calls to CartTokenSession::setTokenCartData()
- CartTokenSession::addCartId in src/
CartTokenSession.php - Adds the given cart order ID to the session.
- CartTokenSession::deleteCartId in src/
CartTokenSession.php - Deletes the given cart order id from the session.
File
- src/
CartTokenSession.php, line 144
Class
- CartTokenSession
- Decorates the cart session to support cart tokens.
Namespace
Drupal\commerce_cart_apiCode
private function setTokenCartData(array $data) {
$token = $this
->getCurrentRequestCartToken();
if (!empty($token)) {
$this->tempStore
->set($token, $data);
}
}