OrderItem
in package
Ligne d'une commande {@see Order}, décrivant une carte de visite physique à produire.
Une commande porte zéro à plusieurs lignes OrderItem (relation orders vers Order,
facultative côté ligne). Chaque ligne référence en outre le modèle de carte commandé
(Card) et, optionnellement, l'employé auquel elle est destinée (Employee).
colorOption et printOption pointent vers les variantes catalogue (CardColorOption,
CardPrintOption) tandis que color et design restent des champs texte libres pour
des personnalisations hors catalogue. quantity est stocké en chaîne de caractères malgré sa
nature numérique.
Attributes
- #[Entity]
- $repositoryClass: \App\Repository\OrderItemRepository::class
Table of Contents
Properties
- $card : Card|null
- $color : string|null
- $colorOption : CardColorOption|null
- $design : string|null
- $employee : Employee|null
- $font : string|null
- $id : int|null
- $orders : Order|null
- $printOption : CardPrintOption|null
- $quantity : string|null
Methods
- getCard() : Card|null
- getColor() : string|null
- getColorOption() : CardColorOption|null
- getDesign() : string|null
- getEmployee() : Employee|null
- getFont() : string|null
- getId() : int|null
- getOrders() : Order|null
- getPrintOption() : CardPrintOption|null
- getQuantity() : string|null
- setCard() : static
- setColor() : static
- setColorOption() : static
- setDesign() : static
- setEmployee() : static
- setFont() : static
- setOrders() : static
- setPrintOption() : static
- setQuantity() : static
Properties
$card
private
Card|null
$card
= null
Attributes
- #[ManyToOne]
- $inversedBy: 'orderItems'
$color
private
string|null
$color
= null
Attributes
- #[Column]
- $length: 255
- $nullable: true
$colorOption
private
CardColorOption|null
$colorOption
= null
Attributes
- #[JoinColumn]
- $nullable: true
- #[ManyToOne]
$design
private
string|null
$design
= null
Attributes
- #[Column]
- $length: 255
- $nullable: true
$employee
private
Employee|null
$employee
= null
Attributes
- #[JoinColumn]
- $nullable: true
- #[ManyToOne]
$font
private
string|null
$font
= null
Attributes
- #[Column]
- $length: 255
$id
private
int|null
$id
= null
Attributes
- #[Column]
- #[GeneratedValue]
- #[Id]
$orders
private
Order|null
$orders
= null
Attributes
- #[ManyToOne]
- $inversedBy: 'orderItems'
$printOption
private
CardPrintOption|null
$printOption
= null
Attributes
- #[JoinColumn]
- $nullable: true
- #[ManyToOne]
$quantity
private
string|null
$quantity
= null
Attributes
- #[Column]
- $length: 255
Methods
getCard()
public
getCard() : Card|null
Return values
Card|nullgetColor()
public
getColor() : string|null
Return values
string|nullgetColorOption()
public
getColorOption() : CardColorOption|null
Return values
CardColorOption|nullgetDesign()
public
getDesign() : string|null
Return values
string|nullgetEmployee()
public
getEmployee() : Employee|null
Return values
Employee|nullgetFont()
public
getFont() : string|null
Return values
string|nullgetId()
public
getId() : int|null
Return values
int|nullgetOrders()
public
getOrders() : Order|null
Return values
Order|nullgetPrintOption()
public
getPrintOption() : CardPrintOption|null
Return values
CardPrintOption|nullgetQuantity()
public
getQuantity() : string|null
Return values
string|nullsetCard()
public
setCard(Card|null $card) : static
Parameters
- $card : Card|null
Return values
staticsetColor()
public
setColor(string|null $color) : static
Parameters
- $color : string|null
Return values
staticsetColorOption()
public
setColorOption(CardColorOption|null $colorOption) : static
Parameters
- $colorOption : CardColorOption|null
Return values
staticsetDesign()
public
setDesign(string $design) : static
Parameters
- $design : string
Return values
staticsetEmployee()
public
setEmployee(Employee|null $employee) : static
Parameters
- $employee : Employee|null
Return values
staticsetFont()
public
setFont(string $font) : static
Parameters
- $font : string
Return values
staticsetOrders()
public
setOrders(Order|null $orders) : static
Parameters
- $orders : Order|null
Return values
staticsetPrintOption()
public
setPrintOption(CardPrintOption|null $printOption) : static
Parameters
- $printOption : CardPrintOption|null
Return values
staticsetQuantity()
public
setQuantity(string $quantity) : static
Parameters
- $quantity : string