ShipperTariff
extends ShipperTariff
in package
`$paymentPrices` is the tariff's payment matrix: an owned collection of {@see PaymentMethodPrice} keyed by (tariff × paymentMethod × currency).
Tags
Attributes
- #[Entity]
- #[Table]
- $name: 'cms_mod_eshop_shipper_tariffs'
- #[TableAlias]
- 'shipperTariff'
Table of Contents
Properties
- $branches : Collection
- $city : string|null
- $country : string|null
- $externalPickup : bool
- $id : int|null
- $latitude : string|null
- $longitude : string|null
- $paymentPrices : Collection
- $prices : Collection
- $shipper : TShipper|null
- $shipperRegion : TShipperRegion|null
- $street : string|null
- $supplyKindId : int|null
- $translations : Collection
- $useShipperBranches : int
- $zip : string|null
Methods
- __construct() : mixed
- addBranch() : $this
- addPaymentPrice() : $this
- addPrice() : $this
- addTranslation() : $this
- callInitMethods() : void
- Calls `init{TraitName}()` for every used trait that defines such a method.
- clearPrices() : $this
- getAllTraits() : array<string, string>
- Returns all traits the class uses, including those used by parent classes and nested traits.
- getBranches() : Collection<int, TBranch>
- Own branches of the tariff: owned collection, plain CRUD (no time series).
- getCity() : string|null
- getCountry() : string|null
- getExternalPickup() : bool
- getId() : int|null
- getLatitude() : string|null
- getLatitudeAsFloat() : float|null
- getLongitude() : string|null
- getLongitudeAsFloat() : float|null
- getPaymentPrices() : Collection<int, TPaymentPrice>
- Payment matrix of the tariff (payment method × currency): owned collection, full replace.
- getPrices() : Collection<int, TPrice>
- getShipper() : TShipper|null
- getShipperRegion() : TShipperRegion|null
- getStreet() : string|null
- getSupplyKindId() : int|null
- getTranslation() : TTranslation|null
- getTranslations() : Collection<int, TTranslation>
- getUseShipperBranches() : int
- getZip() : string|null
- isExternalPickup() : bool
- isPersisted() : bool
- priceCollectionInit() : void
- removePrice() : $this
- removeTranslation() : $this
- setBranches() : $this
- setCity() : $this
- setCountry() : $this
- setExternalPickup() : $this
- setId() : $this
- setLatitude() : $this
- setLongitude() : $this
- setPaymentPrices() : $this
- setPrices() : $this
- setShipper() : $this
- setShipperRegion() : $this
- setStreet() : $this
- setSupplyKindId() : TBranch>
- setTranslations() : $this
- setUseShipperBranches() : $this
- setZip() : $this
- translationCollectionInit() : void
- getTraitsRecursive() : array<string, string>
- Walks the trait list recursively and collects nested traits too.
Properties
$branches
protected
Collection
$branches
Attributes
- #[OneToMany]
- $targetEntity: \App\UI\Api\Eshop\Models\Entities\ShipperTariffBranch::class
- $mappedBy: 'tariff'
- $cascade: ['persist', 'remove']
- $orphanRemoval: true
- $fetch: 'LAZY'
$city
protected
string|null
$city
= null
Attributes
- #[Column]
- $name: 'city'
- $type: 'string'
- $length: 100
- $nullable: true
$country
protected
string|null
$country
= null
Attributes
- #[Column]
- $name: 'country'
- $type: 'string'
- $length: 60
- $nullable: true
$externalPickup
protected
bool
$externalPickup
= false
Attributes
- #[Column]
- $name: 'external_pickup'
- $type: 'boolean'
$id
protected
int|null
$id
= null
Attributes
- #[Column]
- $name: 'shipper_tariff_id'
- $type: 'integer'
- $options: ['unsigned' => true]
- #[GeneratedValue]
- #[Id]
$latitude
protected
string|null
$latitude
= null
Attributes
- #[Column]
- $name: 'latitude'
- $type: 'decimal'
- $precision: 10
- $scale: 6
- $nullable: true
$longitude
protected
string|null
$longitude
= null
Attributes
- #[Column]
- $name: 'longitude'
- $type: 'decimal'
- $precision: 10
- $scale: 6
- $nullable: true
$paymentPrices
protected
Collection
$paymentPrices
Attributes
- #[OneToMany]
- $targetEntity: \App\UI\Api\Eshop\Models\Entities\PaymentMethodPrice::class
- $mappedBy: 'tariff'
- $cascade: ['persist', 'remove']
- $orphanRemoval: true
- $fetch: 'LAZY'
$prices
protected
Collection
$prices
Attributes
- #[OneToMany]
- $targetEntity: \App\UI\Api\Eshop\Models\Entities\ShipperTariffPrice::class
- $mappedBy: 'tariff'
- $cascade: ['persist', 'remove']
- $orphanRemoval: true
- $fetch: 'LAZY'
$shipper
protected
TShipper|null
$shipper
= null
Attributes
- #[JoinColumn]
- $name: 'cms_mod_eshop_shippers_shipper_id'
- $referencedColumnName: 'shipper_id'
- $nullable: false
- $onDelete: 'CASCADE'
- #[ManyToOne]
- $targetEntity: \App\UI\Api\Eshop\Models\Entities\Shipper::class
- $fetch: 'LAZY'
$shipperRegion
protected
TShipperRegion|null
$shipperRegion
= null
Attributes
- #[JoinColumn]
- $name: 'cms_mod_eshop_shipper_regions_shipper_region_id'
- $referencedColumnName: 'shipper_region_id'
- $nullable: true
- $onDelete: 'SET NULL'
- #[ManyToOne]
- $targetEntity: \App\UI\Api\Eshop\Models\Entities\ShipperRegion::class
- $fetch: 'LAZY'
$street
protected
string|null
$street
= null
Attributes
- #[Column]
- $name: 'street'
- $type: 'string'
- $length: 100
- $nullable: true
$supplyKindId
protected
int|null
$supplyKindId
= null
Attributes
- #[Column]
- $name: 'cms_system_supply_kinds_supply_kind_id'
- $type: 'integer'
- $nullable: true
- $options: ['unsigned' => true]
$translations
protected
Collection
$translations
Attributes
- #[OneToMany]
- $targetEntity: \App\UI\Api\Eshop\Models\Entities\ShipperTariffText::class
- $mappedBy: 'parent'
- $cascade: ['persist', 'remove']
- $orphanRemoval: true
- $fetch: 'LAZY'
$useShipperBranches
protected
int
$useShipperBranches
= 0
Attributes
- #[Column]
- $name: 'use_shipper_branches'
- $type: 'integer'
- $options: ['unsigned' => true]
$zip
protected
string|null
$zip
= null
Attributes
- #[Column]
- $name: 'zip'
- $type: 'string'
- $length: 10
- $nullable: true
Methods
__construct()
public
__construct([int|null $id = null ][, mixed $shipper = null ][, mixed $shipperRegion = null ][, string|null $street = null ][, string|null $city = null ][, string|null $zip = null ][, string|null $country = null ][, string|null $latitude = null ][, string|null $longitude = null ][, int $useShipperBranches = 0 ][, bool $externalPickup = false ][, Collection $translations = new ArrayCollection() ][, Collection $prices = new ArrayCollection() ][, Collection $paymentPrices = new ArrayCollection() ][, Collection $branches = new ArrayCollection() ][, int|null $supplyKindId = null ]) : mixed
Parameters
- $id : int|null = null
- $shipper : mixed = null
- $shipperRegion : mixed = null
- $street : string|null = null
- $city : string|null = null
- $zip : string|null = null
- $country : string|null = null
- $latitude : string|null = null
- $longitude : string|null = null
- $useShipperBranches : int = 0
- $externalPickup : bool = false
- $translations : Collection = new ArrayCollection()
- $prices : Collection = new ArrayCollection()
- $paymentPrices : Collection = new ArrayCollection()
- $branches : Collection = new ArrayCollection()
- $supplyKindId : int|null = null
addBranch()
public
addBranch(TBranch $branch) : $this
Parameters
- $branch : TBranch
Return values
$thisaddPaymentPrice()
public
addPaymentPrice(TPaymentPrice $paymentPrice) : $this
Parameters
- $paymentPrice : TPaymentPrice
Return values
$thisaddPrice()
public
addPrice(TPrice $price) : $this
Parameters
- $price : TPrice
Return values
$thisaddTranslation()
public
addTranslation(TTranslation $translation) : $this
Parameters
- $translation : TTranslation
Return values
$thiscallInitMethods()
Calls `init{TraitName}()` for every used trait that defines such a method.
public
callInitMethods() : void
clearPrices()
public
clearPrices() : $this
Return values
$thisgetAllTraits()
Returns all traits the class uses, including those used by parent classes and nested traits.
public
getAllTraits() : array<string, string>
Return values
array<string, string>getBranches()
Own branches of the tariff: owned collection, plain CRUD (no time series).
public
getBranches() : Collection<int, TBranch>
Return values
Collection<int, TBranch>getCity()
public
getCity() : string|null
Return values
string|nullgetCountry()
public
getCountry() : string|null
Return values
string|nullgetExternalPickup()
public
getExternalPickup() : bool
Return values
boolgetId()
public
getId() : int|null
Return values
int|nullgetLatitude()
public
getLatitude() : string|null
Return values
string|nullgetLatitudeAsFloat()
public
getLatitudeAsFloat() : float|null
Return values
float|nullgetLongitude()
public
getLongitude() : string|null
Return values
string|nullgetLongitudeAsFloat()
public
getLongitudeAsFloat() : float|null
Return values
float|nullgetPaymentPrices()
Payment matrix of the tariff (payment method × currency): owned collection, full replace.
public
getPaymentPrices() : Collection<int, TPaymentPrice>
Return values
Collection<int, TPaymentPrice>getPrices()
public
getPrices() : Collection<int, TPrice>
Return values
Collection<int, TPrice>getShipper()
public
getShipper() : TShipper|null
Return values
TShipper|nullgetShipperRegion()
public
getShipperRegion() : TShipperRegion|null
Return values
TShipperRegion|nullgetStreet()
public
getStreet() : string|null
Return values
string|nullgetSupplyKindId()
public
getSupplyKindId() : int|null
Return values
int|nullgetTranslation()
public
getTranslation(int $langId) : TTranslation|null
Parameters
- $langId : int
Return values
TTranslation|nullgetTranslations()
public
getTranslations() : Collection<int, TTranslation>
Return values
Collection<int, TTranslation>getUseShipperBranches()
public
getUseShipperBranches() : int
Return values
intgetZip()
public
getZip() : string|null
Return values
string|nullisExternalPickup()
public
isExternalPickup() : bool
Return values
boolisPersisted()
public
isPersisted() : bool
Return values
boolpriceCollectionInit()
public
priceCollectionInit() : void
removePrice()
public
removePrice(TPrice $price) : $this
Parameters
- $price : TPrice
Return values
$thisremoveTranslation()
public
removeTranslation(TTranslation $translation) : $this
Parameters
- $translation : TTranslation
Return values
$thissetBranches()
public
setBranches(Collection<int, TBranch>|array<int, TBranch> $branches) : $this
Parameters
- $branches : Collection<int, TBranch>|array<int, TBranch>
Return values
$thissetCity()
public
setCity(string|null $city) : $this
Parameters
- $city : string|null
Return values
$thissetCountry()
public
setCountry(string|null $country) : $this
Parameters
- $country : string|null
Return values
$thissetExternalPickup()
public
setExternalPickup(bool $externalPickup) : $this
Parameters
- $externalPickup : bool
Return values
$thissetId()
public
setId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thissetLatitude()
public
setLatitude(string|null $latitude) : $this
Parameters
- $latitude : string|null
Return values
$thissetLongitude()
public
setLongitude(string|null $longitude) : $this
Parameters
- $longitude : string|null
Return values
$thissetPaymentPrices()
public
setPaymentPrices(Collection<int, TPaymentPrice>|array<int, TPaymentPrice> $paymentPrices) : $this
Parameters
- $paymentPrices : Collection<int, TPaymentPrice>|array<int, TPaymentPrice>
Return values
$thissetPrices()
public
setPrices(Collection<int, TPrice>|array<int, TPrice> $prices) : $this
Parameters
- $prices : Collection<int, TPrice>|array<int, TPrice>
Return values
$thissetShipper()
public
setShipper(TShipper|null $shipper) : $this
Parameters
- $shipper : TShipper|null
Return values
$thissetShipperRegion()
public
setShipperRegion(TShipperRegion|null $shipperRegion) : $this
Parameters
- $shipperRegion : TShipperRegion|null
Return values
$thissetStreet()
public
setStreet(string|null $street) : $this
Parameters
- $street : string|null
Return values
$thissetSupplyKindId()
public
setSupplyKindId(int|null $supplyKindId) : TBranch>
Parameters
- $supplyKindId : int|null
Return values
TBranch>setTranslations()
public
setTranslations(Collection<int, TTranslation>|array<int, TTranslation> $translations) : $this
Parameters
- $translations : Collection<int, TTranslation>|array<int, TTranslation>
Return values
$thissetUseShipperBranches()
public
setUseShipperBranches(int $useShipperBranches) : $this
Parameters
- $useShipperBranches : int
Return values
$thissetZip()
public
setZip(string|null $zip) : $this
Parameters
- $zip : string|null
Return values
$thistranslationCollectionInit()
public
translationCollectionInit() : void
getTraitsRecursive()
Walks the trait list recursively and collects nested traits too.
private
static getTraitsRecursive(array<string, string> $traits) : array<string, string>
Parameters
- $traits : array<string, string>