You are here

public function MoveToCart::__construct in Commerce Wishlist 8.3

Constructs a new MoveToCart object.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin ID for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\commerce_wishlist\WishlistManagerInterface $wishlist_manager: The wishlist manager.

\Drupal\commerce_cart\CartManagerInterface $cart_manager: The cart manager.

\Drupal\commerce_cart\CartProviderInterface $cart_provider: The cart provider.

\Drupal\commerce_order\Resolver\OrderTypeResolverInterface $order_type_resolver: The order type resolver.

\Drupal\commerce_store\CurrentStoreInterface $current_store: The current store.

Overrides HandlerBase::__construct

File

src/Plugin/views/field/MoveToCart.php, line 86

Class

MoveToCart
Defines a form element for moving or copying the wishlist item to the cart.

Namespace

Drupal\commerce_wishlist\Plugin\views\field

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, WishlistManagerInterface $wishlist_manager, CartManagerInterface $cart_manager, CartProviderInterface $cart_provider, OrderTypeResolverInterface $order_type_resolver, CurrentStoreInterface $current_store) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->wishlistManager = $wishlist_manager;
  $this->cartManager = $cart_manager;
  $this->cartProvider = $cart_provider;
  $this->orderTypeResolver = $order_type_resolver;
  $this->currentStore = $current_store;
}