Vacation
extends Vacation
in package
Shipping exclusion window (vacation) affecting delivery estimates.
Tags
Attributes
- #[Entity]
- #[Table]
- $name: 'cms_mod_store_vacations'
- #[TableAlias]
- 'vacation'
Table of Contents
Properties
- $activated : bool
- $endDate : DateTime
- $id : int|null
- $insertDatetime : DateTime
- $startDate : DateTime
- $translations : Collection
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.
- getEndDate() : DateTime
- getId() : int|null
- getInsertDatetime() : DateTime
- getStartDate() : DateTime
- getTranslation() : TTranslation|null
- getTranslations() : Collection<int, TTranslation>
- isActivated() : bool
- isPersisted() : bool
- removeTranslation() : $this
- setActivated() : $this
- setEndDate() : $this
- setId() : $this
- setInsertDatetime() : $this
- setStartDate() : $this
- setTranslations() : $this
- translationCollectionInit() : void
- getTraitsRecursive() : array<string, string>
- Walks the trait list recursively and collects nested traits too.
Properties
$activated
protected
bool
$activated
= false
Attributes
- #[Column]
- $name: 'activated'
- $type: 'boolean'
$endDate
protected
DateTime
$endDate
= new DateTime()
Attributes
- #[Column]
- $name: 'end_date'
- $type: 'date'
$id
protected
int|null
$id
= null
Attributes
- #[Column]
- $name: 'vacation_id'
- $type: 'integer'
- $options: ['unsigned' => true]
- #[GeneratedValue]
- #[Id]
$insertDatetime
protected
DateTime
$insertDatetime
= new DateTime()
Attributes
- #[Column]
- $name: 'insert_datetime'
- $type: 'datetime'
$startDate
protected
DateTime
$startDate
= new DateTime()
Attributes
- #[Column]
- $name: 'start_date'
- $type: 'date'
$translations
protected
Collection
$translations
Attributes
- #[OneToMany]
- $targetEntity: \App\UI\Api\Store\Models\Entities\VacationText::class
- $mappedBy: 'parent'
- $cascade: ['persist', 'remove']
- $orphanRemoval: true
- $fetch: 'LAZY'
Methods
__construct()
public
__construct([int|null $id = null ][, DateTime $startDate = new DateTime() ][, DateTime $endDate = new DateTime() ][, bool $activated = false ][, DateTime $insertDatetime = new DateTime() ][, Collection $translations = new ArrayCollection() ]) : mixed
Parameters
- $id : int|null = null
- $startDate : DateTime = new DateTime()
- $endDate : DateTime = new DateTime()
- $activated : bool = false
- $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>getEndDate()
public
getEndDate() : DateTime
Return values
DateTimegetId()
public
getId() : int|null
Return values
int|nullgetInsertDatetime()
public
getInsertDatetime() : DateTime
Return values
DateTimegetStartDate()
public
getStartDate() : DateTime
Return values
DateTimegetTranslation()
public
getTranslation(int $langId) : TTranslation|null
Parameters
- $langId : int
Return values
TTranslation|nullgetTranslations()
public
getTranslations() : Collection<int, TTranslation>
Return values
Collection<int, TTranslation>isActivated()
public
isActivated() : bool
Return values
boolisPersisted()
public
isPersisted() : 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
$thissetEndDate()
public
setEndDate(DateTime $endDate) : $this
Parameters
- $endDate : DateTime
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
$thissetStartDate()
public
setStartDate(DateTime $startDate) : $this
Parameters
- $startDate : DateTime
Return values
$thissetTranslations()
public
setTranslations(Collection<int, TTranslation>|array<int, TTranslation> $translations) : $this
Parameters
- $translations : Collection<int, TTranslation>|array<int, TTranslation>
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>