CardPrintOption
in package
Variante de finition d'impression proposée pour un modèle de carte {@see Card}, avec son propre supplément de prix.
Une carte porte zéro à plusieurs options d'impression ; chacune appartient à une carte
unique (jointure obligatoire). price est le supplément appliqué lorsque cette finition est
choisie, initialisé à '0.00' et jamais laissé à null : setPrice(null) ou
setPrice('') sont normalisés vers '0.00'. isDefault (par défaut false) marque la
finition présélectionnée pour la carte ; isActive (par défaut true) permet de la
désactiver sans la supprimer. Les accesseurs isDefault()/getIsDefault() et
isActive()/getIsActive(), ainsi que leurs setters setDefault()/setIsDefault() et
setActive()/setIsActive(), sont des paires d'alias équivalentes.
Attributes
- #[Entity]
Table of Contents
Properties
- $card : Card|null
- $id : int|null
- $isActive : bool|null
- $isDefault : bool|null
- $label : string|null
- $price : string|null
Methods
- getCard() : Card|null
- getId() : int|null
- getIsActive() : bool|null
- getIsDefault() : bool|null
- getLabel() : string|null
- getPrice() : string|null
- isActive() : bool|null
- isDefault() : bool|null
- setActive() : static
- setCard() : static
- setDefault() : static
- setIsActive() : static
- setIsDefault() : static
- setLabel() : static
- setPrice() : static
Properties
$card
private
Card|null
$card
= null
Attributes
- #[JoinColumn]
- $nullable: false
- #[ManyToOne]
- $inversedBy: 'printOptions'
$id
private
int|null
$id
= null
Attributes
- #[Column]
- #[GeneratedValue]
- #[Id]
$isActive
private
bool|null
$isActive
= true
Attributes
- #[Column]
$isDefault
private
bool|null
$isDefault
= false
Attributes
- #[Column]
$label
private
string|null
$label
= null
Attributes
- #[Column]
- $length: 100
$price
private
string|null
$price
= '0.00'
Attributes
- #[Column]
- $type: \Doctrine\DBAL\Types\Types::DECIMAL
- $precision: 10
- $scale: 2
Methods
getCard()
public
getCard() : Card|null
Return values
Card|nullgetId()
public
getId() : int|null
Return values
int|nullgetIsActive()
public
getIsActive() : bool|null
Return values
bool|nullgetIsDefault()
public
getIsDefault() : bool|null
Return values
bool|nullgetLabel()
public
getLabel() : string|null
Return values
string|nullgetPrice()
public
getPrice() : string|null
Return values
string|nullisActive()
public
isActive() : bool|null
Return values
bool|nullisDefault()
public
isDefault() : bool|null
Return values
bool|nullsetActive()
public
setActive(bool $isActive) : static
Parameters
- $isActive : bool
Return values
staticsetCard()
public
setCard(Card|null $card) : static
Parameters
- $card : Card|null
Return values
staticsetDefault()
public
setDefault(bool $isDefault) : static
Parameters
- $isDefault : bool
Return values
staticsetIsActive()
public
setIsActive(bool $isActive) : static
Parameters
- $isActive : bool
Return values
staticsetIsDefault()
public
setIsDefault(bool $isDefault) : static
Parameters
- $isDefault : bool
Return values
staticsetLabel()
public
setLabel(string $label) : static
Parameters
- $label : string
Return values
staticsetPrice()
public
setPrice(string|null $price) : static
Parameters
- $price : string|null