public function WishlistProviderInterface::getWishlist in Commerce Wishlist 8.3
Gets the wishlist entity for the given user.
Parameters
string $wishlist_type: The wishlist type ID.
\Drupal\Core\Session\AccountInterface $account: The user. If empty, the current user is assumed.
Return value
\Drupal\commerce_wishlist\Entity\WishlistInterface|null The wishlist entity, or NULL if none found.
1 method overrides WishlistProviderInterface::getWishlist()
- WishlistProvider::getWishlist in src/
WishlistProvider.php - Gets the wishlist entity for the given user.
File
- src/
WishlistProviderInterface.php, line 43
Class
- WishlistProviderInterface
- Creates and loads wishlists for anonymous and authenticated users.
Namespace
Drupal\commerce_wishlistCode
public function getWishlist($wishlist_type, AccountInterface $account = NULL);