BCard - Documentation technique

PhysicalCard
in package

Commande d'impression et de livraison d'une carte de visite physique reprenant une carte virtuelle.

Une carte physique appartient à un utilisateur (User, obligatoire) et duplique le contenu d'une carte virtuelle (BusinessCardAize, obligatoire) sur un modèle produit (Card, obligatoire) avec, en option, un CardModel, une variante de couleur (CardColorOption) et de finition (CardPrintOption), et un rattachement à une Order. status prend l'une des valeurs PENDING, PENDING_PAYMENT, CONFIRMED, PROCESSING, SHIPPED ou DELIVERED (constantes STATUS_*), initialisé à PENDING. Ces noms suggèrent un déroulement logique dans cet ordre, mais aucune machine à états ne l'impose : ni l'entité ni les contrôleurs ne valident les transitions. En particulier, PhysicalCardApiController::updateStatus() (admin) accepte n'importe laquelle des valeurs PENDING, PROCESSING, SHIPPED ou DELIVERED sans contrôle de l'état courant ni de l'ordre — CONFIRMED et PENDING_PAYMENT n'y sont même pas proposées, elles ne sont positionnées que par le flux de commande initial. price est normalisé en chaîne décimale à deux décimales par setPrice(), qui accepte indifféremment une chaîne (avec séparateurs ,/espaces tolérés), un entier ou un flottant. customFrontImage, customBackImage, logoFile, frontText, backText et fontFamily permettent une personnalisation de la carte distincte de celle de la carte virtuelle source ; designerInstructions porte des consignes libres à destination de l'atelier d'impression.

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

Table of Contents

Constants

STATUS_CONFIRMED  : mixed = 'CONFIRMED'
STATUS_DELIVERED  : mixed = 'DELIVERED'
STATUS_PENDING  : mixed = 'PENDING'
STATUS_PENDING_PAYMENT  : mixed = 'PENDING_PAYMENT'
STATUS_PROCESSING  : mixed = 'PROCESSING'
STATUS_SHIPPED  : mixed = 'SHIPPED'

Properties

$backText  : string|null
$cardModel  : CardModel|null
$cardProduct  : Card|null
$colorOption  : CardColorOption|null
$createdAt  : DateTimeInterface|null
$customBackImage  : string|null
$customFrontImage  : string|null
$designerInstructions  : string|null
$fontFamily  : string|null
$frontText  : string|null
$id  : int|null
$logoFile  : string|null
$order  : Order|null
$price  : string|null
$printOption  : CardPrintOption|null
$shippingAddress  : string|null
$status  : string|null
$updatedAt  : DateTimeInterface|null
$user  : User|null
$virtualCard  : BusinessCardAize|null

Methods

__construct()  : mixed
getBackText()  : string|null
getCardModel()  : CardModel|null
getCardProduct()  : Card|null
getColorOption()  : CardColorOption|null
getCreatedAt()  : DateTimeInterface|null
getCustomBackImage()  : string|null
getCustomFrontImage()  : string|null
getDesignerInstructions()  : string|null
getFontFamily()  : string|null
getFrontText()  : string|null
getId()  : int|null
getLogoFile()  : string|null
getOrder()  : Order|null
getPrice()  : string|null
getPrintOption()  : CardPrintOption|null
getShippingAddress()  : string|null
getStatus()  : string|null
getUpdatedAt()  : DateTimeInterface|null
getUser()  : User|null
getVirtualCard()  : BusinessCardAize|null
setBackText()  : static
setCardModel()  : static
setCardProduct()  : static
setColorOption()  : static
setCreatedAt()  : static
setCustomBackImage()  : static
setCustomFrontImage()  : static
setDesignerInstructions()  : static
setFontFamily()  : static
setFrontText()  : static
setLogoFile()  : static
setOrder()  : static
setPrice()  : static
setPrintOption()  : static
setShippingAddress()  : static
setStatus()  : static
setUpdatedAt()  : static
setUser()  : static
setVirtualCard()  : static

Constants

STATUS_CONFIRMED

public mixed STATUS_CONFIRMED = 'CONFIRMED'

STATUS_DELIVERED

public mixed STATUS_DELIVERED = 'DELIVERED'

STATUS_PENDING_PAYMENT

public mixed STATUS_PENDING_PAYMENT = 'PENDING_PAYMENT'

STATUS_PROCESSING

public mixed STATUS_PROCESSING = 'PROCESSING'

Properties

$backText

private string|null $backText = null
Attributes
#[Column]
$type: 'text'
$nullable: true

$cardModel

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

$cardProduct

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

$createdAt

private DateTimeInterface|null $createdAt = null
Attributes
#[Column]
$type: 'datetime'

$customBackImage

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

$customFrontImage

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

$designerInstructions

private string|null $designerInstructions = null
Attributes
#[Column]
$type: 'text'
$nullable: true

$fontFamily

private string|null $fontFamily = null
Attributes
#[Column]
$length: 100
$nullable: true

$frontText

private string|null $frontText = null
Attributes
#[Column]
$type: 'text'
$nullable: true

$id

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

$logoFile

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

$order

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

$price

private string|null $price = null
Attributes
#[Column]
$type: 'decimal'
$precision: 10
$scale: 2
$nullable: true

$shippingAddress

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

$status

private string|null $status = self::STATUS_PENDING
Attributes
#[Column]
$length: 50

$updatedAt

private DateTimeInterface|null $updatedAt = null
Attributes
#[Column]
$type: 'datetime'
$nullable: true

$user

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

$virtualCard

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

Methods

getBackText()

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

getCreatedAt()

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

getCustomBackImage()

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

getCustomFrontImage()

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

getDesignerInstructions()

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

getFontFamily()

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

getFrontText()

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

getId()

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

getLogoFile()

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

getPrice()

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

getShippingAddress()

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

getStatus()

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

getUpdatedAt()

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

setBackText()

public setBackText(string|null $backText) : static
Parameters
$backText : string|null
Return values
static

setCardProduct()

public setCardProduct(Card|null $cardProduct) : static
Parameters
$cardProduct : Card|null
Return values
static

setCreatedAt()

public setCreatedAt(DateTimeInterface $createdAt) : static
Parameters
$createdAt : DateTimeInterface
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

setDesignerInstructions()

public setDesignerInstructions(string|null $designerInstructions) : static
Parameters
$designerInstructions : string|null
Return values
static

setFontFamily()

public setFontFamily(string|null $fontFamily) : static
Parameters
$fontFamily : string|null
Return values
static

setFrontText()

public setFrontText(string|null $frontText) : static
Parameters
$frontText : string|null
Return values
static

setLogoFile()

public setLogoFile(string|null $logoFile) : static
Parameters
$logoFile : string|null
Return values
static

setOrder()

public setOrder(Order|null $order) : static
Parameters
$order : Order|null
Return values
static

setPrice()

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

setShippingAddress()

public setShippingAddress(string|null $shippingAddress) : static
Parameters
$shippingAddress : string|null
Return values
static

setStatus()

public setStatus(string $status) : static
Parameters
$status : string
Return values
static

setUpdatedAt()

public setUpdatedAt(DateTimeInterface $updatedAt) : static
Parameters
$updatedAt : DateTimeInterface
Return values
static

setUser()

public setUser(User|null $user) : static
Parameters
$user : User|null
Return values
static

        
On this page

Search results