public function WishlistProvider::getWishlistIds in Commerce Wishlist 8.3
Gets all wishlist entity ids for the given user.
Parameters
\Drupal\Core\Session\AccountInterface $account: The user. If empty, the current user is assumed.
Return value
int[] A list of wishlist entity ids.
Overrides WishlistProviderInterface::getWishlistIds
1 call to WishlistProvider::getWishlistIds()
- WishlistProvider::getWishlists in src/
WishlistProvider.php - Gets all wishlist entities for the given user.
File
- src/
WishlistProvider.php, line 167
Class
- WishlistProvider
- Default implementation of the wishlist provider.
Namespace
Drupal\commerce_wishlistCode
public function getWishlistIds(AccountInterface $account = NULL) {
$wishlist_data = $this
->loadWishlistData($account);
return array_keys($wishlist_data);
}