public static function Utility::removeFromCart in Basic cart 8.0
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.2 src/Utility.php \Drupal\basic_cart\Utility::removeFromCart()
- 8.3 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
File
- src/
Utility.php, line 67 - Contains \Drupal\basic_cart\Utility
Class
Namespace
Drupal\basic_cartCode
public static function removeFromCart($nid = NULL) {
$nid = (int) $nid;
$storage = static::getStorage();
$storage
->removeFromCart($nid);
}