You are here

function hook_uc_cart_item_presave in Ubercart 8.4

Same name and namespace in other branches
  1. 7.3 uc_cart/uc_cart.api.php \hook_uc_cart_item_presave()

Act on a cart item before it is about to be created or updated.

Parameters

\Drupal\uc_cart\CartItemInterface $entity: The cart item entity object.

File

uc_cart/uc_cart.api.php, line 171
Hooks provided by the Cart module.

Code

function hook_uc_cart_item_presave(CartItemInterface $entity) {
  $entity->changed = \Drupal::time()
    ->getRequestTime();
}