cart = $cart; $this->entity = $entity; $this->quantity = $quantity; $this->orderItem = $order_item; } /** * Gets the cart order. * * @return \Drupal\commerce_order\Entity\OrderInterface * The cart order. */ public function getCart() { return $this->cart; } /** * Gets the added entity. * * @return \Drupal\commerce\PurchasableEntityInterface * The added entity. */ public function getEntity() { return $this->entity; } /** * Gets the quantity. * * @return float * The quantity. */ public function getQuantity() { return $this->quantity; } /** * Gets the destination order item. * * @return \Drupal\commerce_order\Entity\OrderItemInterface * The destination order item. */ public function getOrderItem() { return $this->orderItem; } }