FlashMessage
extends FlashMessage
in package
Tags
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
$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'
$publicationDatetime
protected
DateTime|null
$publicationDatetime
= null
Attributes
- #[Column]
- $name: 'publication_datetime'
- $type: 'datetime'
- $nullable: true
$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]
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
$thiscallInitMethods()
Calls `init{TraitName}()` for every used trait that defines such a method.
public
callInitMethods() : void
getActive()
public
getActive() : bool
Return values
boolgetAllTraits()
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|nullgetExpirationDatetime()
public
getExpirationDatetime() : DateTime|null
Return values
DateTime|nullgetId()
public
getId() : int|null
Return values
int|nullgetInsertDatetime()
public
getInsertDatetime() : DateTime
Return values
DateTimegetPublicationDatetime()
public
getPublicationDatetime() : DateTime|null
Return values
DateTime|nullgetTranslation()
public
getTranslation(int $langId) : TTranslation|null
Parameters
- $langId : int
Return values
TTranslation|nullgetTranslations()
public
getTranslations() : Collection<int, TTranslation>
Return values
Collection<int, TTranslation>getUser()
public
getUser() : TUser|null
Return values
TUser|nullgetUserId()
public
getUserId() : int|null
Return values
int|nullisActive()
public
isActive() : bool
Return values
boolisPersisted()
public
isPersisted() : 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
$thissetAsset()
public
setAsset(TImage|null $asset) : $this
Parameters
- $asset : TImage|null
Return values
$thissetExpirationDatetime()
public
setExpirationDatetime(DateTime|null $expirationDatetime) : $this
Parameters
- $expirationDatetime : DateTime|null
Return values
$thissetId()
public
setId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thissetInsertTime()
public
setInsertTime(DateTime $insertDatetime) : $this
Parameters
- $insertDatetime : DateTime
Return values
$thissetPublicationDatetime()
public
setPublicationDatetime(DateTime|null $publicationDatetime) : $this
Parameters
- $publicationDatetime : DateTime|null
Return values
$thissetTranslations()
public
setTranslations(Collection<int, TTranslation>|array<int, TTranslation> $translations) : $this
Parameters
- $translations : Collection<int, TTranslation>|array<int, TTranslation>
Return values
$thissetUser()
public
setUser(TUser|null $user) : $this
Parameters
- $user : TUser|null
Return values
$thissetUserId()
public
setUserId(int|null $userId) : $this
Parameters
- $userId : int|null
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>