ShipperTariffBranch
extends BaseEntity
in package
implements
IdentifiableInterface
uses
IdentifiableTrait
Branch (pickup point for personal collection) belonging to one carrier tariff: one tariff has many branches.
The address fields (street, city, zip, country, latitude, longitude) match those
on ShipperTariff itself, which keeps its own address; a branch is an additional
address and does not change the tariff's.
isManaged is a positive flag: true means a manually managed branch, shown in the admin
grid and modal (the admin form always filters isManaged = true). false is a reserved
slot for a future bulk sync of an external carrier network (e.g. Packeta boxes), with no
sync logic, cron or front picker yet. The admin form never sends this field; a new record
from the form always gets isManaged = true on the server.
There is no _texts table: branch name and address are not translated (language-neutral
data, like Producer.name/Currency).
Tags
Attributes
- #[MappedSuperclass]
- #[TableAlias]
- $alias: 'shipperTariffBranch'
Table of Contents
Interfaces
- IdentifiableInterface
- Entity with a simple integer primary key. Most entities have one (often via {@see \App\Core\Traits\Shared\Models\Entities\IdentifiableTrait}); texts and links with a composite key do not, which is why `getId()` is not on {@see \App\Core\Base\BaseEntity}. Code that needs the id of a generic entity asks for this interface (parameter type, template bound, `instanceof`).
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
$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
getActive()
public
getActive() : bool
Return values
boolgetAllTraits()
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>getCity()
public
getCity() : string|null
Return values
string|nullgetCountry()
public
getCountry() : string|null
Return values
string|nullgetId()
public
getId() : int|null
Return values
int|nullgetIsManaged()
public
getIsManaged() : bool
Return values
boolgetLatitude()
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|nullgetName()
public
getName() : string
Return values
stringgetStreet()
public
getStreet() : string|null
Return values
string|nullgetTariff()
public
getTariff() : TTariff|null
Return values
TTariff|nullgetZip()
public
getZip() : string|null
Return values
string|nullisActive()
public
isActive() : bool
Return values
boolisManaged()
public
isManaged() : bool
Return values
boolisPersisted()
public
isPersisted() : bool
Return values
boolsetActive()
public
setActive(bool $active) : $this
Parameters
- $active : bool
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
$thissetId()
public
setId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thissetIsManaged()
public
setIsManaged(bool $isManaged) : $this
Parameters
- $isManaged : bool
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
$thissetName()
public
setName(string $name) : $this
Parameters
- $name : string
Return values
$thissetStreet()
public
setStreet(string|null $street) : $this
Parameters
- $street : string|null
Return values
$thissetTariff()
public
setTariff(TTariff|null $tariff) : $this
Parameters
- $tariff : TTariff|null
Return values
$thissetZip()
public
setZip(string|null $zip) : $this
Parameters
- $zip : string|null
Return values
$thisgetTraitsRecursive()
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>