interface CartInterface in Basic cart 8.6
Same name and namespace in other branches
- 8 src/CartInterface.php \Drupal\basic_cart\CartInterface
- 8.0 src/CartInterface.php \Drupal\basic_cart\CartInterface
- 8.2 src/CartInterface.php \Drupal\basic_cart\CartInterface
- 8.3 src/CartInterface.php \Drupal\basic_cart\CartInterface
- 8.4 src/CartInterface.php \Drupal\basic_cart\CartInterface
- 8.5 src/CartInterface.php \Drupal\basic_cart\CartInterface
Cart interface definition for basic_cart plugins.
Hierarchy
- interface \Drupal\basic_cart\CartInterface
Expanded class hierarchy of CartInterface
All classes that implement CartInterface
File
- src/
CartInterface.php, line 8
Namespace
Drupal\basic_cartView source
interface CartInterface {
/**
* Get Cart.
*
* @param int $nid
* Node id.
*/
public function getCart($nid = NULL);
/**
* Remove from Cart.
*
* @param int $nid
* Node id.
*/
public function removeFromCart($nid);
/**
* Empty cart.
*/
public function emptyCart();
/**
* Add to cart.
*
* @param int $id
* Node id.
* @param array $params
* Array to define quantity and entity type.
*/
public function addToCart($id, array $params = array());
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CartInterface:: |
public | function | Add to cart. | 2 |
CartInterface:: |
public | function | Empty cart. | 2 |
CartInterface:: |
public | function | Get Cart. | 2 |
CartInterface:: |
public | function | Remove from Cart. | 2 |