Email
extends BaseEntity
in package
implements
IdentifiableInterface
uses
IdentifiableTrait, TranslationCollectionTrait
AbstractYes
Tags
Attributes
- #[MappedSuperclass]
- #[TableAlias]
- $alias: '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
- $active : bool
- $files : string|null
- $id : int|null
- $insertDate : DateTime
- $key : string
- $preferred : bool
- $sendImmediately : bool
- $translations : Collection<int, TTranslation>
Methods
- __construct() : mixed
- addTranslation() : $this
- callInitMethods() : void
- Calls `init{TraitName}()` for every used trait that defines such a method.
- getAllTraits() : array<string, string>
- Returns all traits the class uses, including those used by parent classes and nested traits.
- getFiles() : string|null
- getFilesUnserialized() : array<int, File>
- getId() : int|null
- getInsertDate() : DateTime
- getKey() : string
- getPreferred() : bool
- getSendImmediately() : bool
- getTranslation() : TTranslation|null
- getTranslations() : Collection<int, TTranslation>
- isActive() : bool
- isPersisted() : bool
- isPreferred() : bool
- isSendImmediately() : bool
- removeTranslation() : $this
- setActive() : $this
- setFiles() : $this
- setId() : $this
- setInsertDate() : $this
- setKey() : $this
- setPreferred() : $this
- setSendImmediately() : $this
- setTranslations() : $this
- translationCollectionInit() : void
- getTraitsRecursive() : array<string, string>
- Walks the trait list recursively and collects nested traits too.
Properties
$active
protected
bool
$active
= true
Attributes
- #[Column]
- $name: 'active'
- $type: 'boolean'
$files
protected
string|null
$files
= null
Attributes
- #[Column]
- $name: 'files'
- $type: 'text'
- $nullable: true
$id
protected
int|null
$id
= null
Attributes
- #[Column]
- $name: 'email_id'
- $type: 'integer'
- #[GeneratedValue]
- $strategy: 'AUTO'
- #[Id]
$insertDate
protected
DateTime
$insertDate
= new DateTime()
Attributes
- #[Column]
- $name: 'insert_date'
- $type: 'date'
$key
protected
string
$key
= ''
Attributes
- #[Column]
- $name: 'email_key'
- $type: 'string'
- $length: 40
- $unique: true
$preferred
protected
bool
$preferred
= false
Attributes
- #[Column]
- $name: 'preferred'
- $type: 'boolean'
$sendImmediately
protected
bool
$sendImmediately
= false
Attributes
- #[Column]
- $name: 'send_immediately'
- $type: 'boolean'
$translations
protected
Collection<int, TTranslation>
$translations
= new ArrayCollection()
Methods
__construct()
public
__construct([int|null $id = null ][, string $key = '' ][, bool $preferred = false ][, bool $sendImmediately = false ][, DateTime $insertDate = new DateTime() ][, string|null $files = null ][, bool $active = true ][, Collection $translations = new ArrayCollection() ]) : mixed
Parameters
- $id : int|null = null
- $key : string = ''
- $preferred : bool = false
- $sendImmediately : bool = false
- $insertDate : DateTime = new DateTime()
- $files : string|null = null
- $active : bool = true
- $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
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>getFiles()
public
getFiles() : string|null
Return values
string|nullgetFilesUnserialized()
public
getFilesUnserialized() : array<int, File>
Return values
array<int, File>getId()
public
getId() : int|null
Return values
int|nullgetInsertDate()
public
getInsertDate() : DateTime
Return values
DateTimegetKey()
public
getKey() : string
Return values
stringgetPreferred()
public
getPreferred() : bool
Return values
boolgetSendImmediately()
public
getSendImmediately() : bool
Return values
boolgetTranslation()
public
getTranslation(int $langId) : TTranslation|null
Parameters
- $langId : int
Return values
TTranslation|nullgetTranslations()
public
getTranslations() : Collection<int, TTranslation>
Return values
Collection<int, TTranslation>isActive()
public
isActive() : bool
Return values
boolisPersisted()
public
isPersisted() : bool
Return values
boolisPreferred()
public
isPreferred() : bool
Return values
boolisSendImmediately()
public
isSendImmediately() : bool
Return values
boolremoveTranslation()
public
removeTranslation(TTranslation $translation) : $this
Parameters
- $translation : TTranslation
Return values
$thissetActive()
public
setActive(bool $active) : $this
Parameters
- $active : bool
Return values
$thissetFiles()
public
setFiles(string|null $files) : $this
Parameters
- $files : string|null
Return values
$thissetId()
public
setId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thissetInsertDate()
public
setInsertDate(DateTime $insertDate) : $this
Parameters
- $insertDate : DateTime
Return values
$thissetKey()
public
setKey(string $key) : $this
Parameters
- $key : string
Return values
$thissetPreferred()
public
setPreferred(bool $preferred) : $this
Parameters
- $preferred : bool
Return values
$thissetSendImmediately()
public
setSendImmediately(bool $sendImmediately) : $this
Parameters
- $sendImmediately : bool
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>