CoolCMS API

Newsletter extends Newsletter
in package

Tags
extends
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\Admin\Base\Models\Entities\NewsletterAddressRel::class
$owned: true
#[OneToMany]
$targetEntity: \App\UI\Admin\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'
#[ExternalReadonly]

$lastAddressId

protected int|null $lastAddressId = null
Attributes
#[Column]
$name: 'last_address_id'
$type: 'integer'
$nullable: true
$options: ['unsigned' => true]
#[ExternalReadonly]
#[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
#[ExternalReadonly]

$sentCount

protected int $sentCount = 0
Attributes
#[Column]
$name: 'sent_count'
$type: 'integer'
$options: ['unsigned' => true]
#[ExternalReadonly]
#[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\Admin\Base\Models\Entities\NewsletterText::class
$owned: true
#[OneToMany]
$targetEntity: \App\UI\Admin\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
$this

addTranslation()

public addTranslation(TTranslation $translation) : $this
Parameters
$translation : TTranslation
Return values
$this

callInitMethods()

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
int

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>

getInsertDatetime()

public getInsertDatetime() : DateTime
Return values
DateTime

getLastAddressId()

public getLastAddressId() : int|null
Return values
int|null

getSendDatetime()

public getSendDatetime() : DateTime|null
Return values
DateTime|null

getSentCount()

public getSentCount() : int
Return values
int

getState()

public getState() : int
Return values
int

getTranslation()

public getTranslation(int $langId) : TTranslation|null
Parameters
$langId : int
Return values
TTranslation|null

getTranslations()

public getTranslations() : Collection<int, TTranslation>
Return values
Collection<int, TTranslation>

removeAddressRel()

public removeAddressRel(TAddressRel $addressRel) : $this
Parameters
$addressRel : TAddressRel
Return values
$this

removeTranslation()

public removeTranslation(TTranslation $translation) : $this
Parameters
$translation : TTranslation
Return values
$this

setAddressRels()

public setAddressRels(Collection<int, TAddressRel>|array<int, TAddressRel> $addressRels) : $this
Parameters
$addressRels : Collection<int, TAddressRel>|array<int, TAddressRel>
Return values
$this

setAllAddresses()

public setAllAddresses(int $val) : $this
Parameters
$val : int
Return values
$this

setId()

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

setInsertDatetime()

public setInsertDatetime(DateTime $dt) : $this
Parameters
$dt : DateTime
Return values
$this

setLastAddressId()

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

setSendDatetime()

public setSendDatetime(DateTime|null $dt) : $this
Parameters
$dt : DateTime|null
Return values
$this

setSentCount()

public setSentCount(int $count) : $this
Parameters
$count : int
Return values
$this

setState()

public setState(int $state) : $this
Parameters
$state : int
Return values
$this

setTranslations()

public setTranslations(Collection<int, TTranslation>|array<int, TTranslation> $translations) : $this
Parameters
$translations : Collection<int, TTranslation>|array<int, TTranslation>
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