BCard - Documentation technique

Plan
in package

Offre d'abonnement (plan tarifaire) proposée aux utilisateurs et aux entreprises.

Porte les tarifs mensuel et annuel (monthlyPrice, yearlyPrice, décimaux), la liste des clés de fonctionnalités incluses (features, JSON — voir getFeaturesLabels() qui les traduit en libellés depuis une table de correspondance codée en dur dans cette classe), le nombre de cartes comprises (cardsIncluded, null ou 0 traités comme illimité par le code appelant) et le tarif d'une carte supplémentaire (additionalCardPrice). isActive contrôle la visibilité du plan, popular et badge sa mise en avant dans la grille tarifaire, et sortOrder son rang d'affichage.

Relation : plusieurs Subscription souscrivent ce plan (subscriptions, one-to-many). getFormattedMonthlyPrice() et getFormattedYearlyPrice() formatent le tarif en francs guinéens (GNF) ; getYearlyDiscount() calcule, en pourcentage entier, la remise du tarif annuel par rapport à douze fois le tarif mensuel.

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

Table of Contents

Properties

$additionalCardPrice  : string|null
$badge  : string|null
$cardsIncluded  : int|null
$createdAt  : DateTimeImmutable|null
$description  : string|null
$features  : array<string|int, mixed>|null
$id  : int|null
$isActive  : bool|null
$monthlyPrice  : string|null
$name  : string|null
$popular  : bool|null
$sortOrder  : int|null
$subscriptions  : Collection<int, Subscription>
$updatedAt  : DateTimeImmutable|null
$yearlyPrice  : string|null

Methods

__construct()  : mixed
addSubscription()  : static
getAdditionalCardPrice()  : string|null
getBadge()  : string|null
getCardsIncluded()  : int|null
getCreatedAt()  : DateTimeImmutable|null
getDescription()  : string|null
getFeatures()  : array<string|int, mixed>|null
getFeaturesLabels()  : array<string|int, mixed>
Retourne les labels des fonctionnalités pour l'affichage
getFormattedMonthlyPrice()  : string
getFormattedYearlyPrice()  : string
getId()  : int|null
getMonthlyPrice()  : string|null
getName()  : string|null
getSortOrder()  : int|null
getSubscriptions()  : Collection<int, Subscription>
getUpdatedAt()  : DateTimeImmutable|null
getYearlyDiscount()  : int
getYearlyPrice()  : string|null
isActive()  : bool|null
isPopular()  : bool|null
removeSubscription()  : static
setActive()  : static
setAdditionalCardPrice()  : static
setBadge()  : static
setCardsIncluded()  : static
setCreatedAt()  : static
setDescription()  : static
setFeatures()  : static
setMonthlyPrice()  : static
setName()  : static
setPopular()  : static
setSortOrder()  : static
setUpdatedAt()  : static
setYearlyPrice()  : static

Properties

$additionalCardPrice

private string|null $additionalCardPrice = null
Attributes
#[Column]
$type: \Doctrine\DBAL\Types\Types::DECIMAL
$precision: 10
$scale: 2
$nullable: true

$badge

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

$cardsIncluded

private int|null $cardsIncluded = null
Attributes
#[Column]
$nullable: true

$createdAt

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

$description

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

$features

private array<string|int, mixed>|null $features = null
Attributes
#[Column]
$type: \Doctrine\DBAL\Types\Types::JSON
$nullable: true

$id

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

$isActive

private bool|null $isActive = true
Attributes
#[Column]

$monthlyPrice

private string|null $monthlyPrice = null
Attributes
#[Column]
$type: \Doctrine\DBAL\Types\Types::DECIMAL
$precision: 10
$scale: 2

$name

private string|null $name = null
Attributes
#[Column]
$length: 100
private bool|null $popular = false
#[Column]

$sortOrder

private int|null $sortOrder = 0
Attributes
#[Column]

$subscriptions

private Collection<int, Subscription> $subscriptions
Attributes
#[OneToMany]
$targetEntity: \App\Entity\Subscription::class
$mappedBy: 'plan'

$updatedAt

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

$yearlyPrice

private string|null $yearlyPrice = null
Attributes
#[Column]
$type: \Doctrine\DBAL\Types\Types::DECIMAL
$precision: 10
$scale: 2

Methods

__construct()

public __construct() : mixed

getAdditionalCardPrice()

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

getBadge()

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

getCardsIncluded()

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

getCreatedAt()

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

getDescription()

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

getFeatures()

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

getFeaturesLabels()

Retourne les labels des fonctionnalités pour l'affichage

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

getFormattedMonthlyPrice()

public getFormattedMonthlyPrice() : string
Return values
string

getFormattedYearlyPrice()

public getFormattedYearlyPrice() : string
Return values
string

getId()

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

getMonthlyPrice()

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

getName()

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

getSortOrder()

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

getUpdatedAt()

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

getYearlyDiscount()

public getYearlyDiscount() : int
Return values
int

getYearlyPrice()

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

isActive()

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

isPopular()

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

removeSubscription()

public removeSubscription(Subscription $subscription) : static
Parameters
$subscription : Subscription
Return values
static

setActive()

public setActive(bool $isActive) : static
Parameters
$isActive : bool
Return values
static

setAdditionalCardPrice()

public setAdditionalCardPrice(string|null $additionalCardPrice) : static
Parameters
$additionalCardPrice : string|null
Return values
static

setBadge()

public setBadge(string|null $badge) : static
Parameters
$badge : string|null
Return values
static

setCardsIncluded()

public setCardsIncluded(int|null $cardsIncluded) : static
Parameters
$cardsIncluded : int|null
Return values
static

setCreatedAt()

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

setDescription()

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

setFeatures()

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

setMonthlyPrice()

public setMonthlyPrice(string $monthlyPrice) : static
Parameters
$monthlyPrice : string
Return values
static

setName()

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

setPopular()

public setPopular(bool $isPopular) : static
Parameters
$isPopular : bool
Return values
static

setSortOrder()

public setSortOrder(int $sortOrder) : static
Parameters
$sortOrder : int
Return values
static

setUpdatedAt()

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

setYearlyPrice()

public setYearlyPrice(string $yearlyPrice) : static
Parameters
$yearlyPrice : string
Return values
static

        
On this page

Search results