CoolCMS API

TariffPriceCollectionTrait

Tags
template

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

Methods

getPrice()

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|null

setPrices()

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
$this
On this page

Search results