Documentation

Product
in package
Uses Sellable, Commentable

Tags
ORM\Entity

(repositoryClass="App\Repository\ProductRepository")

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

$category

private mixed $category
Tags
ORM\ManyToOne

(targetEntity="ProductCategory", inversedBy="products")

$comment

private mixed $comment
Tags
ORM\Column

(type="string", length=256 , nullable=true)

$image

url for image

private mixed $image
Tags
ORM\Column

(type="string", length=256, nullable=true)

$name

private mixed $name
Tags
ORM\Column

(type="string", length=100)

$price

private mixed $price
Tags
ORM\Column

(type="decimal", scale=2, nullable=true)

$productsSold

private mixed $productsSold
Tags
ORM\OneToMany

(targetEntity="App\Entity\ProductSold", mappedBy="product", cascade={"remove"})

$stockCount

number of items available

private mixed $stockCount
Tags
ORM\Column

(name="stock_count", type="integer")

$user

private mixed $user
Tags
ORM\ManyToOne

(targetEntity="App\Entity\User", inversedBy="products")

Methods

__construct()

Constructor

public __construct() : mixed

addAdmin()

public addAdmin(Admin $admin) : static
Parameters
$admin : Admin
Return values
static

getId()

Get id.

public getId() : int
Return values
int

getImage()

Get image.

public getImage() : string|null
Return values
string|null

getName()

Get name.

public getName() : string
Return values
string

getStockCount()

Get stockCount.

public getStockCount() : int
Return values
int

removeAdmin()

public removeAdmin(Admin $admin) : static
Parameters
$admin : Admin
Return values
static

removeProductsSold()

Remove productsSold.

public removeProductsSold(User $productsSold) : bool
Parameters
$productsSold : User
Return values
bool

TRUE if this collection contained the specified element, FALSE otherwise.

setComment()

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
Product

setName()

Set name.

public setName(string $name) : Product
Parameters
$name : string
Return values
Product

setPrice()

public setPrice(mixed $price) : mixed
Parameters
$price : mixed

setStockCount()

Set stockCount.

public setStockCount(int $stockCount) : Product
Parameters
$stockCount : int
Return values
Product

        
On this page

Search results