CoolCMS API

NewsletterAddress extends BaseEntity
in package
implements IdentifiableInterface uses IdentifiableTrait

Attributes
#[MappedSuperclass]
#[Table]
$name: 'cms_mod_base_newsletter_addresses'
#[UniqueConstraint]
$name: 'uq_email'
$columns: ['email']

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

$actionCode  : NewsletterActionCode|null
$activated  : bool
$activationKey  : string|null
$email  : string|null
$id  : int|null
$insertDatetime  : DateTime|null
$languageId  : int|null

Methods

__construct()  : mixed
callInitMethods()  : void
Calls `init{TraitName}()` for every used trait that defines such a method.
getActionCode()  : NewsletterActionCode|null
getActivated()  : bool
getActivationKey()  : string|null
getAllTraits()  : array<string, string>
Returns all traits the class uses, including those used by parent classes and nested traits.
getEmail()  : string|null
getId()  : int|null
getInsertDatetime()  : DateTime|null
getLanguageId()  : int|null
isActivated()  : bool
isPersisted()  : bool
setActionCode()  : $this
setActivated()  : $this
setActivationKey()  : $this
setEmail()  : $this
setId()  : $this
setInsertDatetime()  : $this
setLanguageId()  : $this
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$activationKey

protected string|null $activationKey = null
Attributes
#[Column]
$name: 'activation_key'
$type: 'string'
$length: 40
#[ExternalReadonly]
#[FieldAccess]
$read: Audience::Internal
$insert: Audience::All
$update: Audience::All

$email

protected string|null $email = null
Attributes
#[Column]
$name: 'email'
$type: 'string'
$length: 255

$id

protected int|null $id = null
Attributes
#[Column]
$name: 'address_id'
$type: 'integer'
$options: ['unsigned' => true]
#[GeneratedValue]
#[Id]

$languageId

protected int|null $languageId = null
Attributes
#[Column]
$name: 'cms_system_languages_language_id'
$type: 'integer'
$nullable: true
$options: ['unsigned' => true]

Methods

__construct()

public __construct([int|null $id = null ][, string|null $email = null ][, DateTime|null $insertDatetime = null ][, NewsletterActionCode|null $actionCode = null ][, int|null $languageId = null ][, bool $activated = false ][, string|null $activationKey = null ]) : mixed
Parameters
$id : int|null = null
$email : string|null = null
$insertDatetime : DateTime|null = null
$actionCode : NewsletterActionCode|null = null
$languageId : int|null = null
$activated : bool = false
$activationKey : string|null = null

callInitMethods()

Calls `init{TraitName}()` for every used trait that defines such a method.

public callInitMethods() : void

getActivationKey()

public getActivationKey() : string|null
Return values
string|null

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|null
Return values
DateTime|null

setActivated()

public setActivated(bool $activated) : $this
Parameters
$activated : bool
Return values
$this

setActivationKey()

public setActivationKey(string|null $activationKey) : $this
Parameters
$activationKey : string|null
Return values
$this

setEmail()

public setEmail(string|null $email) : $this
Parameters
$email : string|null
Return values
$this

setId()

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

setInsertDatetime()

public setInsertDatetime(DateTime|null $insertDatetime) : $this
Parameters
$insertDatetime : DateTime|null
Return values
$this

setLanguageId()

public setLanguageId(int|null $languageId) : $this
Parameters
$languageId : int|null
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