CoolCMS API

ShipperTariffBranch extends ShipperTariffBranch
in package

Branch (pickup point for personal collection) belonging to one carrier tariff: one tariff has many branches.

Tags
extends
Attributes
#[Entity]
#[Table]
$name: 'cms_mod_eshop_shipper_tariff_branches'
#[TableAlias]
'shipperTariffBranch'

Table of Contents

Properties

$active  : bool
$city  : string|null
$country  : string|null
$id  : int|null
$isManaged  : bool
$latitude  : string|null
$longitude  : string|null
$name  : string
$street  : string|null
$tariff  : TTariff|null
$zip  : string|null

Methods

__construct()  : mixed
callInitMethods()  : void
Calls `init{TraitName}()` for every used trait that defines such a method.
getActive()  : bool
getAllTraits()  : array<string, string>
Returns all traits the class uses, including those used by parent classes and nested traits.
getCity()  : string|null
getCountry()  : string|null
getId()  : int|null
getIsManaged()  : bool
getLatitude()  : string|null
getLatitudeAsFloat()  : float|null
getLongitude()  : string|null
getLongitudeAsFloat()  : float|null
getName()  : string
getStreet()  : string|null
getTariff()  : TTariff|null
getZip()  : string|null
isActive()  : bool
isManaged()  : bool
isPersisted()  : bool
setActive()  : $this
setCity()  : $this
setCountry()  : $this
setId()  : $this
setIsManaged()  : $this
setLatitude()  : $this
setLongitude()  : $this
setName()  : $this
setStreet()  : $this
setTariff()  : $this
setZip()  : $this
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$active

protected bool $active = true
Attributes
#[Column]
$name: 'active'
$type: 'boolean'
$options: ['default' => true]

$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

$id

protected int|null $id = null
Attributes
#[Column]
$name: 'shipper_tariff_branch_id'
$type: 'integer'
$options: ['unsigned' => true]
#[GeneratedValue]
#[Id]

$isManaged

protected bool $isManaged = true
Attributes
#[Column]
$name: 'is_managed'
$type: 'boolean'
$options: ['default' => true]

$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

$name

protected string $name = ''
Attributes
#[Column]
$name: 'name'
$type: 'string'
$length: 255

$street

protected string|null $street = null
Attributes
#[Column]
$name: 'street'
$type: 'string'
$length: 100
$nullable: true

$tariff

protected TTariff|null $tariff = null
Attributes
#[JoinColumn]
$name: 'cms_mod_eshop_shipper_tariffs_shipper_tariff_id'
$referencedColumnName: 'shipper_tariff_id'
$nullable: false
$onDelete: 'CASCADE'
#[ManyToOne]
$targetEntity: \App\UI\Api\Eshop\Models\Entities\ShipperTariff::class
$inversedBy: 'branches'

$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 $tariff = null ][, string $name = '' ][, string|null $street = null ][, string|null $city = null ][, string|null $zip = null ][, string|null $country = null ][, string|null $latitude = null ][, string|null $longitude = null ][, bool $active = true ][, bool $isManaged = true ]) : mixed
Parameters
$id : int|null = null
$tariff : mixed = null
$name : string = ''
$street : string|null = null
$city : string|null = null
$zip : string|null = null
$country : string|null = null
$latitude : string|null = null
$longitude : string|null = null
$active : bool = true
$isManaged : bool = true

callInitMethods()

Calls `init{TraitName}()` for every used trait that defines such a method.

public callInitMethods() : void

getAllTraits()

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>

getLatitudeAsFloat()

public getLatitudeAsFloat() : float|null
Return values
float|null

getLongitudeAsFloat()

public getLongitudeAsFloat() : float|null
Return values
float|null

setActive()

public setActive(bool $active) : $this
Parameters
$active : bool
Return values
$this

setCity()

public setCity(string|null $city) : $this
Parameters
$city : string|null
Return values
$this

setCountry()

public setCountry(string|null $country) : $this
Parameters
$country : string|null
Return values
$this

setId()

public setId(int|null $id) : $this
Parameters
$id : int|null
Return values
$this

setIsManaged()

public setIsManaged(bool $isManaged) : $this
Parameters
$isManaged : bool
Return values
$this

setLatitude()

public setLatitude(string|null $latitude) : $this
Parameters
$latitude : string|null
Return values
$this

setLongitude()

public setLongitude(string|null $longitude) : $this
Parameters
$longitude : string|null
Return values
$this

setName()

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

setStreet()

public setStreet(string|null $street) : $this
Parameters
$street : string|null
Return values
$this

setTariff()

public setTariff(TTariff|null $tariff) : $this
Parameters
$tariff : TTariff|null
Return values
$this

setZip()

public setZip(string|null $zip) : $this
Parameters
$zip : string|null
Return values
$this

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>
Return values
array<string, string>
On this page

Search results