PricingPlan
-
#[ApiResource]
-
$operations: [
// new Get(),
new \ApiPlatform\Metadata\GetCollection(),
]
-
$normalizationContext: ['groups' => ['pricing:read'], 'enable_max_depth' => true]
-
#[Entity]
-
$repositoryClass: \App\Repository\PricingPlanRepository::class
-
#[UniqueEntity]
-
$fields: 'name'
-
$message: "Le nom du forfait est unique"
Table of Contents
Properties
-
$features
: Collection<int, Feature>
-
$id
: int|null
-
$name
: string|null
-
$pricePerMonth
: float|null
-
$pricePerYear
: float|null
-
$subscriptions
: Collection<int, Subscription>
-
$typeSubscription
: string|null
Methods
-
__construct()
: mixed
-
addFeature()
: static
-
addSubscription()
: static
-
getFeatures()
: Collection<int, Feature>
-
getId()
: int|null
-
getName()
: string|null
-
getPricePerMonth()
: float|null
-
getPricePerYear()
: float|null
-
getSubscriptions()
: Collection<int, Subscription>
-
getTypeSubscription()
: string|null
-
removeFeature()
: static
-
removeSubscription()
: static
-
setName()
: static
-
setPricePerMonth()
: static
-
setPricePerYear()
: static
-
setTypeSubscription()
: static
$features
private
Collection<int, Feature>
$features
-
#[Groups]
-
['pricing:read']
-
#[MaxDepth]
-
1
-
#[OneToMany]
-
$targetEntity: \App\Entity\Feature::class
-
$mappedBy: 'pricing'
-
$cascade: ['persist']
$id
private
int|null
$id
= null
-
#[Column]
-
#[GeneratedValue]
-
#[Groups]
-
['pricing:read']
-
#[Id]
$name
private
string|null
$name
= null
-
#[Column]
-
$length: 255
-
#[Groups]
-
['pricing:read']
$pricePerMonth
private
float|null
$pricePerMonth
= null
-
#[Column]
-
$nullable: true
-
#[Groups]
-
['pricing:read']
$pricePerYear
private
float|null
$pricePerYear
= null
-
#[Column]
-
$nullable: true
-
#[Groups]
-
['pricing:read']
$subscriptions
private
Collection<int, Subscription>
$subscriptions
-
#[Groups]
-
['pricing:read']
-
#[MaxDepth]
-
1
-
#[OneToMany]
-
$targetEntity: \App\Entity\Subscription::class
-
$mappedBy: 'pricingPlan'
-
$orphanRemoval: true
$typeSubscription
private
string|null
$typeSubscription
= null
-
#[Column]
-
$length: 255
-
#[Groups]
-
['pricing:read']
__construct()
public
__construct() : mixed
addFeature()
public
addFeature(Feature $feature) : static
Parameters
-
$feature
: Feature
-
addSubscription()
public
addSubscription(Subscription $subscription) : static
Parameters
-
$subscription
: Subscription
-
getFeatures()
public
getFeatures() : Collection<int, Feature>
Return values
Collection<int, Feature>
getId()
public
getId() : int|null
getName()
public
getName() : string|null
Return values
string|null
getPricePerMonth()
public
getPricePerMonth() : float|null
getPricePerYear()
public
getPricePerYear() : float|null
getSubscriptions()
public
getSubscriptions() : Collection<int, Subscription>
getTypeSubscription()
public
getTypeSubscription() : string|null
Return values
string|null
removeFeature()
public
removeFeature(Feature $feature) : static
Parameters
-
$feature
: Feature
-
removeSubscription()
public
removeSubscription(Subscription $subscription) : static
Parameters
-
$subscription
: Subscription
-
setName()
public
setName(string $name) : static
Parameters
-
$name
: string
-
setPricePerMonth()
public
setPricePerMonth(float $pricePerMonth) : static
Parameters
-
$pricePerMonth
: float
-
setPricePerYear()
public
setPricePerYear(float $pricePerYear) : static
Parameters
-
$pricePerYear
: float
-
setTypeSubscription()
public
setTypeSubscription(string $typeSubscription) : static
Parameters
-
$typeSubscription
: string
-