public static function Utility::removeFromCart in Basic cart 8.3
Same name and namespace in other branches
- 8.6 src/Utility.php \Drupal\basic_cart\Utility::removeFromCart()
- 8 src/Utility.php \Drupal\basic_cart\Utility::removeFromCart()
- 8.0 src/Utility.php \Drupal\basic_cart\Utility::removeFromCart()
- 8.2 src/Utility.php \Drupal\basic_cart\Utility::removeFromCart()
- 8.4 src/Utility.php \Drupal\basic_cart\Utility::removeFromCart()
- 8.5 src/Utility.php \Drupal\basic_cart\Utility::removeFromCart()
Callback function for cart/remove/.
Parameters
int $nid: We are using the node id to remove the node in the shopping cart.
1 call to Utility::removeFromCart()
- CartController::removeFromCart in src/
Controller/ CartController.php - Remove node from cart.
File
- src/
Utility.php, line 75
Class
- Utility
- Utilty functions for basic cart.
Namespace
Drupal\basic_cartCode
public static function removeFromCart($nid = NULL) {
$nid = (int) $nid;
$storage = static::getStorage();
$storage
->removeFromCart($nid);
}