BConnect POS - Reference PHP

Category
in package

Attributes
#[ApiResource]
$operations: [new \ApiPlatform\Metadata\GetCollection(), new \ApiPlatform\Metadata\Get()]
$normalizationContext: ['groups' => ['category:read']]
$filters: [\App\Filter\PointOfSaleParamFilter::class]
#[Entity]
$repositoryClass: \App\Repository\CategoryRepository::class
#[UniqueConstraint]
$name: 'uniq_category_name_pos'
$columns: ['name', 'point_of_sale_id']
#[UniqueEntity]
$fields: ['name', 'pointOfSaleId']
$message: "Le nom de la catĂ©gorie doit ĂȘtre unique par point de vente"

Table of Contents

Constants

CATEGORY  : mixed = "category"
SUB_CATEGORY  : mixed = "sub-category"

Properties

$archiveStatus  : bool|null
$category  : self|null
$created_at  : DateTimeImmutable|null
$id  : int|null
$name  : string|null
$pointOfSaleId  : int|null
$products  : Collection
$productStocks  : Collection
$subCategory  : Collection
$type  : string|null
$updated_at  : DateTimeImmutable|null

Methods

__construct()  : mixed
addProduct()  : static
addProductStock()  : static
addSubCategory()  : static
getCategory()  : self|null
getCreatedAt()  : DateTimeImmutable|null
getId()  : int|null
getName()  : string|null
getPointOfSale()  : int|null
getProducts()  : Collection<int, Product>
getProductStocks()  : Collection<int, ProductStock>
getSubCategory()  : Collection<int, self>
getType()  : string|null
getUpdatedAt()  : DateTimeImmutable|null
isArchiveStatus()  : bool|null
removeProduct()  : static
removeProductStock()  : static
removeSubCategory()  : static
setArchiveStatus()  : static
setCategory()  : static
setCreatedAt()  : static
setName()  : static
setPointOfSale()  : static
setType()  : static
setUpdatedAt()  : static

Constants

CATEGORY

public mixed CATEGORY = "category"

SUB_CATEGORY

public mixed SUB_CATEGORY = "sub-category"

Properties

$archiveStatus

private bool|null $archiveStatus = null
Attributes
#[Column]
$nullable: true

$category

private self|null $category = null
Attributes
#[ManyToOne]
$targetEntity: self::class
$inversedBy: 'subCategory'

$created_at

private DateTimeImmutable|null $created_at = null
Attributes
#[Column]

$id

private int|null $id = null
Attributes
#[Column]
#[GeneratedValue]
#[Groups]
'category:read'
#[Id]

$name

private string|null $name = null
Attributes
#[Column]
$length: 255
#[Groups]
'category:read'

$pointOfSaleId

private int|null $pointOfSaleId = null
Attributes
#[Column]

$products

private Collection $products
Attributes
#[OneToMany]
$mappedBy: 'category'
$targetEntity: \App\Entity\Product::class

$productStocks

private Collection $productStocks
Attributes
#[OneToMany]
$mappedBy: 'category'
$targetEntity: \App\Entity\ProductStock::class

$subCategory

private Collection $subCategory
Attributes
#[OneToMany]
$mappedBy: 'category'
$targetEntity: self::class

$type

private string|null $type = null
Attributes
#[Column]
$length: 255
$nullable: true

$updated_at

private DateTimeImmutable|null $updated_at = null
Attributes
#[Column]

Methods

__construct()

public __construct() : mixed

addProduct()

public addProduct(Product $productStock) : static
Parameters
$productStock : Product
Return values
static

addSubCategory()

public addSubCategory(self $subCategory) : static
Parameters
$subCategory : self
Return values
static

getCategory()

public getCategory() : self|null
Return values
self|null

getCreatedAt()

public getCreatedAt() : DateTimeImmutable|null
Return values
DateTimeImmutable|null

getId()

public getId() : int|null
Return values
int|null

getName()

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

getPointOfSale()

public getPointOfSale() : int|null
Return values
int|null

getSubCategory()

public getSubCategory() : Collection<int, self>
Return values
Collection<int, self>

getType()

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

getUpdatedAt()

public getUpdatedAt() : DateTimeImmutable|null
Return values
DateTimeImmutable|null

isArchiveStatus()

public isArchiveStatus() : bool|null
Return values
bool|null

removeProduct()

public removeProduct(Product $product) : static
Parameters
$product : Product
Return values
static

removeSubCategory()

public removeSubCategory(self $subCategory) : static
Parameters
$subCategory : self
Return values
static

setArchiveStatus()

public setArchiveStatus(bool|null $archiveStatus) : static
Parameters
$archiveStatus : bool|null
Return values
static

setCategory()

public setCategory(self|null $category) : static
Parameters
$category : self|null
Return values
static

setCreatedAt()

public setCreatedAt(DateTimeImmutable $created_at) : static
Parameters
$created_at : DateTimeImmutable
Return values
static

setName()

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

setPointOfSale()

public setPointOfSale(int $pointOfSale) : static
Parameters
$pointOfSale : int
Return values
static

setType()

public setType(string|null $type) : static
Parameters
$type : string|null
Return values
static

setUpdatedAt()

public setUpdatedAt(DateTimeImmutable $updated_at) : static
Parameters
$updated_at : DateTimeImmutable
Return values
static
On this page

Search results