You are here

public function CartTable::__construct in Basic cart 8

Same name and namespace in other branches
  1. 8.6 src/CartTable.php \Drupal\basic_cart\CartTable::__construct()
  2. 8.0 src/CartTable.php \Drupal\basic_cart\CartTable::__construct()
  3. 8.2 src/CartTable.php \Drupal\basic_cart\CartTable::__construct()
  4. 8.3 src/CartTable.php \Drupal\basic_cart\CartTable::__construct()
  5. 8.4 src/CartTable.php \Drupal\basic_cart\CartTable::__construct()
  6. 8.5 src/CartTable.php \Drupal\basic_cart\CartTable::__construct()

File

src/CartTable.php, line 18

Class

CartTable
Class CartTable.

Namespace

Drupal\basic_cart

Code

public function __construct(CartStorage $cart_storage, $user) {
  $this->user = $user;
  $this->user_id = $user
    ->id();
  $this->cart_storage = $cart_storage;
}