ContactMessage
extends BaseEntity
in package
implements
OwnerAwareInterface, IdentifiableInterface
uses
IdentifiableTrait
AbstractYes
Attributes
- #[MappedSuperclass]
- #[TableAlias]
- $alias: 'contactMessage'
Table of Contents
Interfaces
- OwnerAwareInterface
- Entity that knows who created it (the owner is the author or sender of the record); the named entry point to the generic base of the conditional RBAC role `owner`.
- 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
- $answerDatetime : DateTime|null
- $answered : bool
- $email : string
- $id : int|null
- $insertDatetime : DateTime
- $phone : string|null
- $read : bool
- $readDatetime : DateTime|null
- $subject : string
- $text : string
- $userId : int|null
Methods
- __construct() : mixed
- 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.
- getAnswerDatetime() : DateTime|null
- getAnswered() : bool
- getEmail() : string
- getId() : int|null
- getInsertDatetime() : DateTime
- getOwnerUserId() : int|null
- Returns the id of the user who created the record; `null` for an unknown or anonymous owner.
- getPhone() : string|null
- getRead() : bool
- getReadDatetime() : DateTime|null
- getSubject() : string
- getText() : string
- getUserId() : int|null
- isAnswered() : bool
- isPersisted() : bool
- isRead() : bool
- setAnswerDatetime() : $this
- setAnswered() : $this
- setEmail() : $this
- setId() : $this
- setInsertDatetime() : $this
- setPhone() : $this
- setRead() : $this
- setReadDatetime() : $this
- setSubject() : $this
- setText() : $this
- setUserId() : $this
- getTraitsRecursive() : array<string, string>
- Walks the trait list recursively and collects nested traits too.
Properties
$answerDatetime
protected
DateTime|null
$answerDatetime
= null
Attributes
- #[Column]
- $type: 'datetime'
- $name: 'answer_datetime'
- $nullable: true
$answered
protected
bool
$answered
= false
Attributes
- #[Column]
- $type: 'boolean'
- $name: 'answered'
protected
string
$email
= ''
Attributes
- #[Column]
- $type: 'string'
- $name: 'email'
- $length: 255
$id
protected
int|null
$id
= null
Attributes
- #[Column]
- $type: 'integer'
- $name: 'contact_message_id'
- $options: ['unsigned' => true]
- #[GeneratedValue]
- #[Id]
$insertDatetime
protected
DateTime
$insertDatetime
= new DateTime()
Attributes
- #[Column]
- $type: 'datetime'
- $name: 'insert_datetime'
$phone
protected
string|null
$phone
= null
Attributes
- #[Column]
- $type: 'string'
- $name: 'phone'
- $length: 255
- $nullable: true
$read
protected
bool
$read
= false
Attributes
- #[Column]
- $type: 'boolean'
- $name: '`read`'
$readDatetime
protected
DateTime|null
$readDatetime
= null
Attributes
- #[Column]
- $type: 'datetime'
- $name: 'read_datetime'
- $nullable: true
$subject
protected
string
$subject
= ''
Attributes
- #[Column]
- $type: 'string'
- $name: 'subject'
- $length: 255
$text
protected
string
$text
= ''
Attributes
- #[Column]
- $type: 'text'
- $name: 'text'
$userId
protected
int|null
$userId
= null
Attributes
- #[Column]
- $type: 'integer'
- $name: 'cms_system_users_user_id'
- $nullable: true
- $options: ['unsigned' => true]
Methods
__construct()
public
__construct([int|null $id = null ][, int|null $userId = null ][, string $subject = '' ][, string $text = '' ][, string $email = '' ][, string|null $phone = null ][, bool $read = false ][, DateTime|null $readDatetime = null ][, bool $answered = false ][, DateTime|null $answerDatetime = null ][, DateTime $insertDatetime = new DateTime() ]) : mixed
Parameters
- $id : int|null = null
- $userId : int|null = null
- $subject : string = ''
- $text : string = ''
- $email : string = ''
- $phone : string|null = null
- $read : bool = false
- $readDatetime : DateTime|null = null
- $answered : bool = false
- $answerDatetime : DateTime|null = null
- $insertDatetime : DateTime = new DateTime()
callInitMethods()
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>getAnswerDatetime()
public
getAnswerDatetime() : DateTime|null
Return values
DateTime|nullgetAnswered()
public
getAnswered() : bool
Return values
boolgetEmail()
public
getEmail() : string
Return values
stringgetId()
public
getId() : int|null
Return values
int|nullgetInsertDatetime()
public
getInsertDatetime() : DateTime
Return values
DateTimegetOwnerUserId()
Returns the id of the user who created the record; `null` for an unknown or anonymous owner.
public
getOwnerUserId() : int|null
Return values
int|nullgetPhone()
public
getPhone() : string|null
Return values
string|nullgetRead()
public
getRead() : bool
Return values
boolgetReadDatetime()
public
getReadDatetime() : DateTime|null
Return values
DateTime|nullgetSubject()
public
getSubject() : string
Return values
stringgetText()
public
getText() : string
Return values
stringgetUserId()
public
getUserId() : int|null
Return values
int|nullisAnswered()
public
isAnswered() : bool
Return values
boolisPersisted()
public
isPersisted() : bool
Return values
boolisRead()
public
isRead() : bool
Return values
boolsetAnswerDatetime()
public
setAnswerDatetime(DateTime|null $dt) : $this
Parameters
- $dt : DateTime|null
Return values
$thissetAnswered()
public
setAnswered(bool $a) : $this
Parameters
- $a : bool
Return values
$thissetEmail()
public
setEmail(string $e) : $this
Parameters
- $e : string
Return values
$thissetId()
public
setId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thissetInsertDatetime()
public
setInsertDatetime(DateTime $dt) : $this
Parameters
- $dt : DateTime
Return values
$thissetPhone()
public
setPhone(string|null $p) : $this
Parameters
- $p : string|null
Return values
$thissetRead()
public
setRead(bool $r) : $this
Parameters
- $r : bool
Return values
$thissetReadDatetime()
public
setReadDatetime(DateTime|null $dt) : $this
Parameters
- $dt : DateTime|null
Return values
$thissetSubject()
public
setSubject(string $s) : $this
Parameters
- $s : string
Return values
$thissetText()
public
setText(string $t) : $this
Parameters
- $t : string
Return values
$thissetUserId()
public
setUserId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thisgetTraitsRecursive()
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>