Warehouse
extends Warehouse
in package
Tags
Attributes
- #[Entity]
- #[Table]
- $name: 'cms_mod_store_warehouses'
- #[TableAlias]
- 'warehouse'
Table of Contents
Properties
- $activated : bool
- $attributeClass : string|null
- $code : string
- $deliveryDays : int
- $id : int|null
- $insertDatetime : DateTime
- $order : int
- $translations : Collection
- $vacationAffected : bool
- Whether the global shipping exclusion window (vacation) affects this warehouse.
Methods
- __construct() : mixed
- addTranslation() : $this
- callInitMethods() : void
- Calls `init{TraitName}()` for every used trait that defines such a method.
- getActivated() : bool
- getAllTraits() : array<string, string>
- Returns all traits the class uses, including those used by parent classes and nested traits.
- getAttributeClass() : string|null
- getCode() : string
- getDeliveryDays() : int
- getId() : int|null
- getInsertDatetime() : DateTime
- getOrder() : int
- getTranslation() : TTranslation|null
- getTranslations() : Collection<int, TTranslation>
- getVacationAffected() : bool
- isActivated() : bool
- isPersisted() : bool
- isVacationAffected() : bool
- removeTranslation() : $this
- setActivated() : $this
- setAttributeClass() : $this
- setCode() : $this
- setDeliveryDays() : $this
- setId() : $this
- setInsertDatetime() : $this
- setOrder() : $this
- setTranslations() : $this
- setVacationAffected() : $this
- translationCollectionInit() : void
- getTraitsRecursive() : array<string, string>
- Walks the trait list recursively and collects nested traits too.
Properties
$activated
protected
bool
$activated
= true
Attributes
- #[Column]
- $name: 'activated'
- $type: 'boolean'
$attributeClass
protected
string|null
$attributeClass
= null
Attributes
- #[Column]
- $name: 'attribute_class'
- $type: 'string'
- $length: 100
- $nullable: true
$code
protected
string
$code
= ''
Attributes
- #[Column]
- $name: 'code'
- $type: 'string'
- $length: 30
$deliveryDays
protected
int
$deliveryDays
= 0
Attributes
- #[Column]
- $name: 'delivery_days'
- $type: 'integer'
- $options: ['unsigned' => true]
$id
protected
int|null
$id
= null
Attributes
- #[Column]
- $name: 'warehouse_id'
- $type: 'integer'
- $options: ['unsigned' => true]
- #[GeneratedValue]
- #[Id]
$insertDatetime
protected
DateTime
$insertDatetime
= new DateTime()
Attributes
- #[Column]
- $name: 'insert_datetime'
- $type: 'datetime'
$order
protected
int
$order
= 1
Attributes
- #[Column]
- $name: '`order`'
- $type: 'integer'
- $options: ['unsigned' => true]
$translations
protected
Collection
$translations
Attributes
- #[CollectionOf]
- \App\UI\Admin\Store\Models\Entities\WarehouseText::class
- $owned: true
- #[OneToMany]
- $targetEntity: \App\UI\Admin\Store\Models\Entities\WarehouseText::class
- $mappedBy: 'parent'
- $cascade: ['persist', 'remove']
- $orphanRemoval: true
- $fetch: 'LAZY'
$vacationAffected
Whether the global shipping exclusion window (vacation) affects this warehouse.
protected
bool
$vacationAffected
= true
true shifts its dispatch day (default, backward compatible); false keeps
dispatching during the vacation and leaves its deliveryDays unshifted.
StockReader applies the shift per
warehouse before taking min(delivery_days).
NOTE: intentionally without #[ExternalReadonly]: this is admin configuration of the
warehouse (like code, deliveryDays, order, attributeClass), not a trust-named
scalar or server-controlled state. External writes to Store are rejected in the
presenter anyway (DenyExternalMutationTrait).
Attributes
- #[Column]
- $name: 'vacation_affected'
- $type: 'boolean'
- $options: ['default' => 1]
Methods
__construct()
public
__construct([int|null $id = null ][, string $code = '' ][, int $deliveryDays = 0 ][, string|null $attributeClass = null ][, int $order = 1 ][, bool $activated = true ][, bool $vacationAffected = true ][, DateTime $insertDatetime = new DateTime() ][, Collection $translations = new ArrayCollection() ]) : mixed
Parameters
- $id : int|null = null
- $code : string = ''
- $deliveryDays : int = 0
- $attributeClass : string|null = null
- $order : int = 1
- $activated : bool = true
- $vacationAffected : bool = true
- $insertDatetime : DateTime = new DateTime()
- $translations : Collection = new ArrayCollection()
addTranslation()
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
getActivated()
public
getActivated() : 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>getAttributeClass()
public
getAttributeClass() : string|null
Return values
string|nullgetCode()
public
getCode() : string
Return values
stringgetDeliveryDays()
public
getDeliveryDays() : int
Return values
intgetId()
public
getId() : int|null
Return values
int|nullgetInsertDatetime()
public
getInsertDatetime() : DateTime
Return values
DateTimegetOrder()
public
getOrder() : int
Return values
intgetTranslation()
public
getTranslation(int $langId) : TTranslation|null
Parameters
- $langId : int
Return values
TTranslation|nullgetTranslations()
public
getTranslations() : Collection<int, TTranslation>
Return values
Collection<int, TTranslation>getVacationAffected()
public
getVacationAffected() : bool
Return values
boolisActivated()
public
isActivated() : bool
Return values
boolisPersisted()
public
isPersisted() : bool
Return values
boolisVacationAffected()
public
isVacationAffected() : bool
Return values
boolremoveTranslation()
public
removeTranslation(TTranslation $translation) : $this
Parameters
- $translation : TTranslation
Return values
$thissetActivated()
public
setActivated(bool $activated) : $this
Parameters
- $activated : bool
Return values
$thissetAttributeClass()
public
setAttributeClass(string|null $attributeClass) : $this
Parameters
- $attributeClass : string|null
Return values
$thissetCode()
public
setCode(string $code) : $this
Parameters
- $code : string
Return values
$thissetDeliveryDays()
public
setDeliveryDays(int $deliveryDays) : $this
Parameters
- $deliveryDays : int
Return values
$thissetId()
public
setId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thissetInsertDatetime()
public
setInsertDatetime(DateTime $insertDatetime) : $this
Parameters
- $insertDatetime : DateTime
Return values
$thissetOrder()
public
setOrder(int $order) : $this
Parameters
- $order : int
Return values
$thissetTranslations()
public
setTranslations(Collection<int, TTranslation>|array<int, TTranslation> $translations) : $this
Parameters
- $translations : Collection<int, TTranslation>|array<int, TTranslation>
Return values
$thissetVacationAffected()
public
setVacationAffected(bool $vacationAffected) : $this
Parameters
- $vacationAffected : bool
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>