public function MoveToWishlist::__construct in Commerce Wishlist 8.3
Constructs a new MoveToWishlist 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_cart\CartManagerInterface $cart_manager: The cart manager.
\Drupal\commerce_wishlist\WishlistManagerInterface $wishlist_manager: The wishlist manager.
\Drupal\commerce_wishlist\WishlistProviderInterface $wishlist_provider: The wishlist provider.
Overrides HandlerBase::__construct
File
- src/
Plugin/ views/ field/ MoveToWishlist.php, line 60
Class
- MoveToWishlist
- Defines a form element for moving or copying the wishlist item to the cart.
Namespace
Drupal\commerce_wishlist\Plugin\views\fieldCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, CartManagerInterface $cart_manager, WishlistManagerInterface $wishlist_manager, WishlistProviderInterface $wishlist_provider) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->cartManager = $cart_manager;
$this->wishlistManager = $wishlist_manager;
$this->wishlistProvider = $wishlist_provider;
}