public static function Utility::addToCart in Basic cart 8
Same name and namespace in other branches
- 8.6 src/Utility.php \Drupal\basic_cart\Utility::addToCart()
- 8.0 src/Utility.php \Drupal\basic_cart\Utility::addToCart()
- 8.2 src/Utility.php \Drupal\basic_cart\Utility::addToCart()
- 8.3 src/Utility.php \Drupal\basic_cart\Utility::addToCart()
- 8.4 src/Utility.php \Drupal\basic_cart\Utility::addToCart()
- 8.5 src/Utility.php \Drupal\basic_cart\Utility::addToCart()
4 calls to Utility::addToCart()
- AddToCart::submitForm in src/
Form/ AddToCart.php - Form submission handler.
- AddToCartWithQuantity::submitForm in src/
Form/ AddToCartWithQuantity.php - Form submission handler.
- CartController::addToCart in src/
Controller/ CartController.php - CartController::addToCartNoRedirect in src/
Controller/ CartController.php
File
- src/
Utility.php, line 81 - Contains \Drupal\basic_cart\Utility
Class
Namespace
Drupal\basic_cartCode
public static function addToCart($id, $params = array()) {
$storage = static::getStorage();
$storage
->addToCart($id, $params);
}