WishlistManager
class WishlistManager implements BasicEntityManagerInterface
Class WishlistManager is injected as empire_wishlists_plugin.wishlist_manager service. WishlistManager handles the logic for entity.
Properties
| protected WishlistRepository | $repository | ||
| protected WishlistEventContainer | $eventContainer |
Methods
WishlistManager constructor.
Get single Wishlist by id
Get all Wishlists for current user
Get id and name of wishlists for current user
Get emails for all user who have specified product in wishlist
Share wishlist wia email
Get reference to Wishlist entity
Get reference for multiple products
Does enay of user wishlists contain specified product
Dispatch custom event
Details
at line 39
__construct(WishlistRepository $repository, WishlistEventContainer $eventContainer)
WishlistManager constructor.
at line 65
boolean
deleteWishlist(Wishlist $wishlist)
Delete single wishlist
at line 76
Wishlist
findOneById(int $wishlistId)
Get single Wishlist by id
at line 85
array|bool
getWishlistsForUser()
Get all Wishlists for current user
at line 99
array|bool
getWishlistsUserForModal()
Get id and name of wishlists for current user
at line 127
addProductToUser(Product $product)
Add product to current users wishlist
at line 140
removeProductFromUser(Product $product)
Remove product from current users wishlist
at line 156
array
getUsersWithProductInWishList(int $productId, Pricelist|null $priceList = null)
Get emails for all user who have specified product in wishlist
at line 168
bool
shareWishlist(mixed $object, string $theme)
Share wishlist wia email
at line 181
Wishlist
getReference(int $id)
Get reference to Wishlist entity
at line 192
ArrayCollection
getReferenceForProducts(array $arrayOfProducts)
Get reference for multiple products
at line 209
bool
shouldRemoveFromUser(mixed $product)
Does enay of user wishlists contain specified product
at line 227
EventWithResult
dispatchShouldAddProductToWishlist()
Dispatch custom event