Newsletter
extends Newsletter
in package
Tags
Attributes
- #[Entity]
- #[Table]
- $name: 'cms_mod_base_newsletters'
- #[TableAlias]
- 'newsletter'
Table of Contents
Properties
- $addressRels : Collection
- $allAddresses : int
- $id : int|null
- $insertDatetime : DateTime
- $lastAddressId : int|null
- $sendDatetime : DateTime|null
- $sentCount : int
- $state : int
- $translations : Collection
Methods
- __construct() : mixed
- addAddressRel() : $this
- addressRelCollectionInit() : void
- addTranslation() : $this
- callInitMethods() : void
- Calls `init{TraitName}()` for every used trait that defines such a method.
- getAddressRels() : Collection<int, TAddressRel>
- getAllAddresses() : int
- getAllTraits() : array<string, string>
- Returns all traits the class uses, including those used by parent classes and nested traits.
- getId() : int|null
- getInsertDatetime() : DateTime
- getLastAddressId() : int|null
- getSendDatetime() : DateTime|null
- getSentCount() : int
- getState() : int
- getTranslation() : TTranslation|null
- getTranslations() : Collection<int, TTranslation>
- isPersisted() : bool
- removeAddressRel() : $this
- removeTranslation() : $this
- setAddressRels() : $this
- setAllAddresses() : $this
- setId() : $this
- setInsertDatetime() : $this
- setLastAddressId() : $this
- setSendDatetime() : $this
- setSentCount() : $this
- setState() : $this
- setTranslations() : $this
- translationCollectionInit() : void
- getTraitsRecursive() : array<string, string>
- Walks the trait list recursively and collects nested traits too.
Properties
$addressRels
protected
Collection
$addressRels
Attributes
- #[CollectionOf]
- \App\UI\Front\Base\Models\Entities\NewsletterAddressRel::class
- $owned: true
- #[OneToMany]
- $targetEntity: \App\UI\Front\Base\Models\Entities\NewsletterAddressRel::class
- $mappedBy: 'newsletter'
- $cascade: ["persist", "remove"]
- $orphanRemoval: true
- $fetch: "LAZY"
$allAddresses
protected
int
$allAddresses
= 1
Attributes
- #[Column]
- $name: 'all_addresses'
- $type: 'integer'
$id
protected
int|null
$id
= null
Attributes
- #[Column]
- $name: 'newsletter_id'
- $type: 'integer'
- $options: ['unsigned' => true]
- #[GeneratedValue]
- #[Id]
$insertDatetime
protected
DateTime
$insertDatetime
= new DateTime()
Attributes
- #[Column]
- $name: 'insert_datetime'
- $type: 'datetime'
$lastAddressId
protected
int|null
$lastAddressId
= null
Attributes
- #[Column]
- $name: 'last_address_id'
- $type: 'integer'
- $nullable: true
- $options: ['unsigned' => true]
- #[FieldAccess]
- $read: Audience::All
- $insert: Audience::None
- $update: Audience::None
$sendDatetime
protected
DateTime|null
$sendDatetime
= null
Attributes
- #[Column]
- $name: 'send_datetime'
- $type: 'datetime'
- $nullable: true
$sentCount
protected
int
$sentCount
= 0
Attributes
- #[Column]
- $name: 'sent_count'
- $type: 'integer'
- $options: ['unsigned' => true]
- #[FieldAccess]
- $read: Audience::All
- $insert: Audience::None
- $update: Audience::None
$state
protected
int
$state
= 1
Attributes
- #[Column]
- $name: 'state'
- $type: 'integer'
- $options: ['unsigned' => true]
$translations
protected
Collection
$translations
Attributes
- #[CollectionOf]
- \App\UI\Front\Base\Models\Entities\NewsletterText::class
- $owned: true
- #[OneToMany]
- $targetEntity: \App\UI\Front\Base\Models\Entities\NewsletterText::class
- $mappedBy: 'parent'
- $cascade: ["persist", "remove"]
- $orphanRemoval: true
- $fetch: "LAZY"
Methods
__construct()
public
__construct([int|null $id = null ][, int $state = 1 ][, DateTime $insertDatetime = new DateTime() ][, DateTime|null $sendDatetime = null ][, int $allAddresses = 1 ][, int|null $lastAddressId = null ][, int $sentCount = 0 ][, Collection $translations = new ArrayCollection() ][, Collection $addressRels = new ArrayCollection() ]) : mixed
Parameters
- $id : int|null = null
- $state : int = 1
- $insertDatetime : DateTime = new DateTime()
- $sendDatetime : DateTime|null = null
- $allAddresses : int = 1
- $lastAddressId : int|null = null
- $sentCount : int = 0
- $translations : Collection = new ArrayCollection()
- $addressRels : Collection = new ArrayCollection()
addAddressRel()
public
addAddressRel(TAddressRel $addressRel) : $this
Parameters
- $addressRel : TAddressRel
Return values
$thisaddressRelCollectionInit()
public
addressRelCollectionInit() : void
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
getAddressRels()
public
getAddressRels() : Collection<int, TAddressRel>
Return values
Collection<int, TAddressRel>getAllAddresses()
public
getAllAddresses() : int
Return values
intgetAllTraits()
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>getId()
public
getId() : int|null
Return values
int|nullgetInsertDatetime()
public
getInsertDatetime() : DateTime
Return values
DateTimegetLastAddressId()
public
getLastAddressId() : int|null
Return values
int|nullgetSendDatetime()
public
getSendDatetime() : DateTime|null
Return values
DateTime|nullgetSentCount()
public
getSentCount() : int
Return values
intgetState()
public
getState() : 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>isPersisted()
public
isPersisted() : bool
Return values
boolremoveAddressRel()
public
removeAddressRel(TAddressRel $addressRel) : $this
Parameters
- $addressRel : TAddressRel
Return values
$thisremoveTranslation()
public
removeTranslation(TTranslation $translation) : $this
Parameters
- $translation : TTranslation
Return values
$thissetAddressRels()
public
setAddressRels(Collection<int, TAddressRel>|array<int, TAddressRel> $addressRels) : $this
Parameters
- $addressRels : Collection<int, TAddressRel>|array<int, TAddressRel>
Return values
$thissetAllAddresses()
public
setAllAddresses(int $val) : $this
Parameters
- $val : int
Return values
$thissetId()
public
setId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thissetInsertDatetime()
public
setInsertDatetime(DateTime $dt) : $this
Parameters
- $dt : DateTime
Return values
$thissetLastAddressId()
public
setLastAddressId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thissetSendDatetime()
public
setSendDatetime(DateTime|null $dt) : $this
Parameters
- $dt : DateTime|null
Return values
$thissetSentCount()
public
setSentCount(int $count) : $this
Parameters
- $count : int
Return values
$thissetState()
public
setState(int $state) : $this
Parameters
- $state : int
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>