TariffPriceCollectionTrait
Tags
Table of Contents
Properties
- $prices : Collection<int, TPrice>
Methods
- addPrice() : $this
- clearPrices() : $this
- getPrice() : TPrice|null
- getPrices() : Collection<int, TPrice>
- removePrice() : $this
- setPrices() : $this
- IMPORTANT: the parameter type must be `Collection`, not `ArrayCollection`; the keep branch of the Api `SaveTrait` passes a `PersistentCollection` from a managed entity, and a narrower type throws a `TypeError` and fails the tariff save in the admin.
- tariffPriceCollectionInit() : void
Properties
$prices
protected
Collection<int, TPrice>
$prices
Methods
addPrice()
public
addPrice(TPrice $price) : $this
Parameters
- $price : TPrice
Return values
$thisclearPrices()
public
clearPrices() : $this
Return values
$thisgetPrice()
public
getPrice([int|null $paymentRegionId = null ][, int|null $paymentGateId = null ][, int|null $currencyId = null ]) : TPrice|null
Parameters
- $paymentRegionId : int|null = null
- $paymentGateId : int|null = null
- $currencyId : int|null = null
Return values
TPrice|nullgetPrices()
public
getPrices() : Collection<int, TPrice>
Return values
Collection<int, TPrice>removePrice()
public
removePrice(TPrice $price) : $this
Parameters
- $price : TPrice
Return values
$thissetPrices()
IMPORTANT: the parameter type must be `Collection`, not `ArrayCollection`; the keep branch of the Api `SaveTrait` passes a `PersistentCollection` from a managed entity, and a narrower type throws a `TypeError` and fails the tariff save in the admin.
public
setPrices(Collection<int, TPrice> $prices) : $this
Parameters
- $prices : Collection<int, TPrice>
Return values
$thistariffPriceCollectionInit()
public
tariffPriceCollectionInit() : void