You are here

public function WishlistManager::__construct in Commerce Wishlist 8.3

Constructs a new WishlistManager object.

Parameters

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

\Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher: The event dispatcher.

File

src/WishlistManager.php, line 45

Class

WishlistManager
Default implementation of the wishlist manager.

Namespace

Drupal\commerce_wishlist

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager, EventDispatcherInterface $event_dispatcher) {
  $this->wishlistItemStorage = $entity_type_manager
    ->getStorage('commerce_wishlist_item');
  $this->eventDispatcher = $event_dispatcher;
}