class Wishlist

Class Wishlist

Properties

protected $id
protected string $name Name of wish list
protected User $user User who created wish list
protected ArrayCollection $products Collection of products in wish list

Methods

__construct()

Wishlist constructor.

int
getId()

No description

setId(int $id)

No description

string
getName()

No description

setName(string $name)

No description

getUser()

No description

setUser(User $user)

No description

ArrayCollection
getProducts(bool $filter = true)

Get products from wishlist, if filter param is set return only available products

setProducts(ArrayCollection $products)

No description

addProduct(Product $product)

Add Product to collection

removeProduct(Product $product)

Remove Products from collection

Details

at line 81
__construct()

Wishlist constructor.

Initialize list of products

at line 89
int getId()

Return Value

int

at line 99
Wishlist setId(int $id)

Parameters

int $id

Return Value

Wishlist

at line 109
string getName()

Return Value

string

at line 119
Wishlist setName(string $name)

Parameters

string $name

Return Value

Wishlist

at line 129
User getUser()

Return Value

User

at line 139
Wishlist setUser(User $user)

Parameters

User $user

Return Value

Wishlist

at line 152
ArrayCollection getProducts(bool $filter = true)

Get products from wishlist, if filter param is set return only available products

Parameters

bool $filter

Return Value

ArrayCollection

at line 166
Wishlist setProducts(ArrayCollection $products)

Parameters

ArrayCollection $products

Return Value

Wishlist

at line 179
Wishlist addProduct(Product $product)

Add Product to collection

Parameters

Product $product

Return Value

Wishlist

at line 190
removeProduct(Product $product)

Remove Products from collection

Parameters

Product $product