BCard - Documentation technique

Card
in package

Article du catalogue de cartes (carte NFC/physique ou modèle de carte virtuelle) vendu ou attribué à un utilisateur.

Une carte appartient optionnellement à un propriétaire (owner, many-to-one vers User) et peut référencer un modèle prédéfini (cardModel, many-to-one vers CardModel) ainsi qu'une carte virtuelle associée lorsque cette carte est physique (virtualCard, auto-référence many-to-one). Elle porte les commandes qui la contiennent (orderItems, one-to-many vers OrderItem), les cartes de visite numériques qui en dérivent (businessCardAizes, one-to-many vers BusinessCardAize), ses paiements (payments, one-to-many vers Payment) et ses options de personnalisation (colorOptions et printOptions, one-to-many avec suppression en cascade et orphan removal vers CardColorOption et CardPrintOption).

isVirtual() et isPhysical() lisent le champ libre cardType (valeurs attendues virtual et physical, non contraintes par une énumération). Le champ taille n'est obligatoire que pour les cartes de type bague (contrainte Assert\Expression portée par la classe).

Attributes
#[Entity]
$repositoryClass: \App\Repository\CardRepository::class

Table of Contents

Properties

$businessCardAizes  : Collection<int, BusinessCardAize>
$cardModel  : CardModel|null
$cardType  : string|null
$colorOptions  : Collection<int, CardColorOption>
$customBackImage  : string|null
$customFrontImage  : string|null
$description  : string|null
$id  : int|null
$images  : array<string|int, mixed>|null
$isHide  : bool|null
$name  : string|null
$orderItems  : Collection<int, OrderItem>
$owner  : User|null
$payments  : Collection<int, Payment>
$polices  : array<string|int, mixed>|null
$price  : string|null
$printOptions  : Collection<int, CardPrintOption>
$specifications  : array<string|int, mixed>|null
$taille  : string|null
$typeProduct  : string|null
$virtualCard  : Card|null

Methods

__construct()  : mixed
addBusinessCardAize()  : static
addColorOption()  : static
addOrderItem()  : static
addPayment()  : static
addPrintOption()  : static
getBusinessCardAizes()  : Collection<int, BusinessCardAize>
getCardModel()  : CardModel|null
getCardType()  : string|null
getColorOptions()  : Collection<int, CardColorOption>
getCustomBackImage()  : string|null
getCustomFrontImage()  : string|null
getDescription()  : string|null
getId()  : int|null
getImages()  : array<string|int, mixed>|null
getName()  : string|null
getOrderItems()  : Collection<int, OrderItem>
getOwner()  : User|null
getPayments()  : Collection<int, Payment>
getPolices()  : array<string|int, mixed>|null
getPrice()  : string|null
getPrintOptions()  : Collection<int, CardPrintOption>
getSpecifications()  : array<string|int, mixed>|null
getTaille()  : string|null
getTypeProduct()  : string|null
getVirtualCard()  : Card|null
isHide()  : bool|null
isPhysical()  : bool
isVirtual()  : bool
removeBusinessCardAize()  : static
removeColorOption()  : static
removeOrderItem()  : static
removePayment()  : static
removePrintOption()  : static
setCardModel()  : static
setCardType()  : static
setCustomBackImage()  : static
setCustomFrontImage()  : static
setDescription()  : static
setHide()  : static
setImages()  : static
setName()  : static
setOwner()  : static
setPolices()  : static
setPrice()  : static
setSpecifications()  : static
setTaille()  : static
setTypeProduct()  : static
setVirtualCard()  : static

Properties

$businessCardAizes

private Collection<int, BusinessCardAize> $businessCardAizes
Attributes
#[OneToMany]
$targetEntity: \App\Entity\BusinessCardAize::class
$mappedBy: 'card'

$cardModel

private CardModel|null $cardModel = null
Attributes
#[JoinColumn]
$nullable: true
#[ManyToOne]
$targetEntity: \App\Entity\CardModel::class
$inversedBy: 'cards'

$cardType

private string|null $cardType = null
Attributes
#[Column]
$length: 50
$nullable: true

$colorOptions

private Collection<int, CardColorOption> $colorOptions
Attributes
#[OneToMany]
$targetEntity: \App\Entity\CardColorOption::class
$mappedBy: 'card'
$cascade: ['persist']
$orphanRemoval: true

$customBackImage

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

$customFrontImage

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

$description

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

$id

private int|null $id = null
Attributes
#[Column]
#[GeneratedValue]
#[Id]

$images

private array<string|int, mixed>|null $images = []
Attributes
#[Column]
$nullable: true

$isHide

private bool|null $isHide = null
Attributes
#[Column]

$name

private string|null $name = null
Attributes
#[Column]
$length: 255

$orderItems

private Collection<int, OrderItem> $orderItems
Attributes
#[OneToMany]
$targetEntity: \App\Entity\OrderItem::class
$mappedBy: 'card'

$owner

private User|null $owner = null
Attributes
#[JoinColumn]
$nullable: true
#[ManyToOne]
$targetEntity: \App\Entity\User::class

$payments

private Collection<int, Payment> $payments
Attributes
#[OneToMany]
$targetEntity: \App\Entity\Payment::class
$mappedBy: 'card'

$polices

private array<string|int, mixed>|null $polices = null
Attributes
#[Column]
$length: 255
$nullable: true

$price

private string|null $price = null
Attributes
#[Column]
$length: 255

$printOptions

private Collection<int, CardPrintOption> $printOptions
Attributes
#[OneToMany]
$targetEntity: \App\Entity\CardPrintOption::class
$mappedBy: 'card'
$cascade: ['persist']
$orphanRemoval: true

$specifications

private array<string|int, mixed>|null $specifications = null
Attributes
#[Column]
$nullable: true

$taille

private string|null $taille = null
Attributes
#[Column]
$length: 255
$nullable: true
#[Expression]
"this.getTypeProduct() != 'bague' or value != null"
$message: "La taille est obligatoire pour une bague"
#[Regex]
$pattern: "/^\\d+\$/"
$message: "La taille doit être un nombre entier"

$typeProduct

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

$virtualCard

private Card|null $virtualCard = null
Attributes
#[JoinColumn]
$nullable: true
#[ManyToOne]
$targetEntity: \App\Entity\Card::class

Methods

__construct()

public __construct() : mixed

addOrderItem()

public addOrderItem(OrderItem $orderItem) : static
Parameters
$orderItem : OrderItem
Return values
static

addPayment()

public addPayment(Payment $payment) : static
Parameters
$payment : Payment
Return values
static

getCardType()

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

getCustomBackImage()

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

getCustomFrontImage()

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

getDescription()

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

getId()

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

getImages()

public getImages() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

getName()

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

getOwner()

public getOwner() : User|null
Return values
User|null

getPayments()

public getPayments() : Collection<int, Payment>
Return values
Collection<int, Payment>

getPolices()

public getPolices() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

getPrice()

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

getSpecifications()

public getSpecifications() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

getTaille()

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

getTypeProduct()

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

getVirtualCard()

public getVirtualCard() : Card|null
Return values
Card|null

isHide()

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

isPhysical()

public isPhysical() : bool
Return values
bool

isVirtual()

public isVirtual() : bool
Return values
bool

removeOrderItem()

public removeOrderItem(OrderItem $orderItem) : static
Parameters
$orderItem : OrderItem
Return values
static

removePayment()

public removePayment(Payment $payment) : static
Parameters
$payment : Payment
Return values
static

setCardModel()

public setCardModel(CardModel|null $cardModel) : static
Parameters
$cardModel : CardModel|null
Return values
static

setCardType()

public setCardType(string|null $cardType) : static
Parameters
$cardType : string|null
Return values
static

setCustomBackImage()

public setCustomBackImage(string|null $customBackImage) : static
Parameters
$customBackImage : string|null
Return values
static

setCustomFrontImage()

public setCustomFrontImage(string|null $customFrontImage) : static
Parameters
$customFrontImage : string|null
Return values
static

setDescription()

public setDescription(string|null $description) : static
Parameters
$description : string|null
Return values
static

setHide()

public setHide(bool $isHide) : static
Parameters
$isHide : bool
Return values
static

setImages()

public setImages(array<string|int, mixed>|null $images) : static
Parameters
$images : array<string|int, mixed>|null
Return values
static

setName()

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

setOwner()

public setOwner(User|null $owner) : static
Parameters
$owner : User|null
Return values
static

setPolices()

public setPolices(array<string|int, mixed>|null $polices) : static
Parameters
$polices : array<string|int, mixed>|null
Return values
static

setPrice()

public setPrice(string|null $price) : static
Parameters
$price : string|null
Return values
static

setSpecifications()

public setSpecifications(array<string|int, mixed>|null $specifications) : static
Parameters
$specifications : array<string|int, mixed>|null
Return values
static

setTaille()

public setTaille(string|null $taille) : static
Parameters
$taille : string|null
Return values
static

setTypeProduct()

public setTypeProduct(string|null $typeProduct) : static
Parameters
$typeProduct : string|null
Return values
static

setVirtualCard()

public setVirtualCard(Card|null $virtualCard) : static
Parameters
$virtualCard : Card|null
Return values
static

        
On this page

Search results