Product
in package
Uses
Sellable, Commentable
Tags
Table of Contents
Properties
- $admins : Collection
- $category : mixed
- $comment : mixed
- $id : mixed
- $image : mixed
- url for image
- $name : mixed
- $price : mixed
- $productsSold : mixed
- $stockCount : mixed
- number of items available
- $user : mixed
Methods
- __construct() : mixed
- Constructor
- addAdmin() : static
- addProductsSold() : Product
- Add productsSold.
- getAdmins() : Collection<int, Admin>
- getCategory() : ProductCategory|null
- Get category.
- getComment() : mixed
- getId() : int
- Get id.
- getImage() : string|null
- Get image.
- getName() : string
- Get name.
- getPrice() : mixed
- getProductsSold() : Collection
- Get productsSold.
- getStockCount() : int
- Get stockCount.
- getUser() : User|null
- Get user.
- removeAdmin() : static
- removeProductsSold() : bool
- Remove productsSold.
- setCategory() : Product
- Set category.
- setComment() : mixed
- setImage() : Product
- Set image.
- setName() : Product
- Set name.
- setPrice() : mixed
- setStockCount() : Product
- Set stockCount.
- setUser() : Product
- Set user.
Properties
$admins
private
Collection
$admins
$category
private
mixed
$category
Tags
$comment
private
mixed
$comment
Tags
$id
private
mixed
$id
$image
url for image
private
mixed
$image
Tags
$name
private
mixed
$name
Tags
$price
private
mixed
$price
Tags
$productsSold
private
mixed
$productsSold
Tags
$stockCount
number of items available
private
mixed
$stockCount
Tags
$user
private
mixed
$user
Tags
Methods
__construct()
Constructor
public
__construct() : mixed
addAdmin()
public
addAdmin(Admin $admin) : static
Parameters
- $admin : Admin
Return values
staticaddProductsSold()
Add productsSold.
public
addProductsSold(User $productsSold) : Product
Parameters
- $productsSold : User
Return values
ProductgetAdmins()
public
getAdmins() : Collection<int, Admin>
Return values
Collection<int, Admin>getCategory()
Get category.
public
getCategory() : ProductCategory|null
Return values
ProductCategory|nullgetComment()
public
getComment() : mixed
getId()
Get id.
public
getId() : int
Return values
intgetImage()
Get image.
public
getImage() : string|null
Return values
string|nullgetName()
Get name.
public
getName() : string
Return values
stringgetPrice()
public
getPrice() : mixed
getProductsSold()
Get productsSold.
public
getProductsSold() : Collection
Return values
CollectiongetStockCount()
Get stockCount.
public
getStockCount() : int
Return values
intgetUser()
Get user.
public
getUser() : User|null
Return values
User|nullremoveAdmin()
public
removeAdmin(Admin $admin) : static
Parameters
- $admin : Admin
Return values
staticremoveProductsSold()
Remove productsSold.
public
removeProductsSold(User $productsSold) : bool
Parameters
- $productsSold : User
Return values
bool —TRUE if this collection contained the specified element, FALSE otherwise.
setCategory()
Set category.
public
setCategory([ProductCategory|null $category = null ]) : Product
Parameters
- $category : ProductCategory|null = null
Return values
ProductsetComment()
public
setComment(mixed $comment) : mixed
Parameters
- $comment : mixed
setImage()
Set image.
public
setImage([string|null $image = null ]) : Product
Parameters
- $image : string|null = null
Return values
ProductsetName()
Set name.
public
setName(string $name) : Product
Parameters
- $name : string
Return values
ProductsetPrice()
public
setPrice(mixed $price) : mixed
Parameters
- $price : mixed
setStockCount()
Set stockCount.
public
setStockCount(int $stockCount) : Product
Parameters
- $stockCount : int
Return values
ProductsetUser()
Set user.
public
setUser([User|null $user = null ]) : Product
Parameters
- $user : User|null = null