CoolCMS API

FlashMessage extends FlashMessage
in package

Tags
extends
Attributes
#[Entity]
#[Table]
$name: 'cms_mod_blog_flash_messages'
#[TableAlias]
'flashMessage'

Table of Contents

Properties

$active  : bool
$asset  : Asset|null
$expirationDatetime  : DateTime|null
$id  : int|null
$insertDatetime  : DateTime
$publicationDatetime  : DateTime|null
$translations  : Collection<int, FlashMessageText>
$user  : User|null
$userId  : int|null

Methods

__construct()  : mixed
addTranslation()  : $this
callInitMethods()  : void
Calls `init{TraitName}()` for every used trait that defines such a method.
getActive()  : bool
getAllTraits()  : array<string, string>
Returns all traits the class uses, including those used by parent classes and nested traits.
getAsset()  : TImage|null
getExpirationDatetime()  : DateTime|null
getId()  : int|null
getInsertDatetime()  : DateTime
getPublicationDatetime()  : DateTime|null
getTranslation()  : TTranslation|null
getTranslations()  : Collection<int, TTranslation>
getUser()  : TUser|null
getUserId()  : int|null
isActive()  : bool
isPersisted()  : bool
removeTranslation()  : $this
setActive()  : $this
setAsset()  : $this
setExpirationDatetime()  : $this
setId()  : $this
setInsertTime()  : $this
setPublicationDatetime()  : $this
setTranslations()  : $this
setUser()  : $this
setUserId()  : $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'

$asset

protected Asset|null $asset = null
Attributes
#[JoinColumn]
$name: 'cms_system_images_image_id'
$referencedColumnName: 'image_id'
$nullable: true
$onDelete: 'SET NULL'
#[ManyToOne]
$targetEntity: \App\UI\Api\System\Models\Entities\Asset::class
$fetch: "LAZY"

$expirationDatetime

protected DateTime|null $expirationDatetime = null
Attributes
#[Column]
$name: 'expiration_datetime'
$type: 'datetime'
$nullable: true
#[ExternalReadonly]

$id

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

$insertDatetime

protected DateTime $insertDatetime = new DateTime()
Attributes
#[Column]
$name: 'insert_datetime'
$type: 'datetime'
#[ExternalReadonly]

$publicationDatetime

protected DateTime|null $publicationDatetime = null
Attributes
#[Column]
$name: 'publication_datetime'
$type: 'datetime'
$nullable: true
#[ExternalReadonly]

$translations

protected Collection<int, FlashMessageText> $translations
Attributes
#[OneToMany]
$targetEntity: \App\UI\Api\Blog\Models\Entities\FlashMessageText::class
$mappedBy: "parent"
$cascade: ["persist", "remove"]
$orphanRemoval: true
$fetch: "LAZY"

$user

protected User|null $user = null
Attributes
#[JoinColumn]
$name: 'cms_system_users_user_id'
$referencedColumnName: 'user_id'
$nullable: true
$onDelete: 'SET NULL'
#[ManyToOne]
$targetEntity: \App\UI\Api\System\Models\Entities\User::class
$fetch: "LAZY"

$userId

protected int|null $userId = null
Attributes
#[Column]
$name: 'cms_system_users_user_id'
$type: 'integer'
$nullable: true
$insertable: false
$updatable: false
$options: ['unsigned' => true]
#[ExternalReadonly]

Methods

__construct()

public __construct([mixed $user = null ][, mixed $asset = null ][, int|null $id = null ][, DateTime $insertDatetime = new DateTime() ][, DateTime|null $publicationDatetime = null ][, DateTime|null $expirationDatetime = null ][, int|null $userId = null ][, bool $active = true ][, Collection $translations = new ArrayCollection() ]) : mixed
Parameters
$user : mixed = null
$asset : mixed = null
$id : int|null = null
$insertDatetime : DateTime = new DateTime()
$publicationDatetime : DateTime|null = null
$expirationDatetime : DateTime|null = null
$userId : int|null = null
$active : bool = true
$translations : Collection = new ArrayCollection()

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

getActive()

public getActive() : bool
Return values
bool

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>

getAsset()

public getAsset() : TImage|null
Return values
TImage|null

getExpirationDatetime()

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

getInsertDatetime()

public getInsertDatetime() : DateTime
Return values
DateTime

getPublicationDatetime()

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

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>

getUser()

public getUser() : TUser|null
Return values
TUser|null

getUserId()

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

removeTranslation()

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

setActive()

public setActive(bool $active) : $this
Parameters
$active : bool
Return values
$this

setAsset()

public setAsset(TImage|null $asset) : $this
Parameters
$asset : TImage|null
Return values
$this

setExpirationDatetime()

public setExpirationDatetime(DateTime|null $expirationDatetime) : $this
Parameters
$expirationDatetime : DateTime|null
Return values
$this

setId()

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

setInsertTime()

public setInsertTime(DateTime $insertDatetime) : $this
Parameters
$insertDatetime : DateTime
Return values
$this

setPublicationDatetime()

public setPublicationDatetime(DateTime|null $publicationDatetime) : $this
Parameters
$publicationDatetime : DateTime|null
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

setUser()

public setUser(TUser|null $user) : $this
Parameters
$user : TUser|null
Return values
$this

setUserId()

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