Response
extends Response
in package
Tags
Attributes
- #[AttributeOverrides]
- [new \Doctrine\ORM\Mapping\AttributeOverride('userId', new \Doctrine\ORM\Mapping\Column(name: 'cms_system_users_user_id', type: 'integer', nullable: true, insertable: false, updatable: false, options: ['unsigned' => true]))]
- #[Entity]
- #[Table]
- $name: 'cms_mod_bazaar_advert_responses'
- #[TableAlias]
- 'response'
Table of Contents
Properties
- $advert : TAdvert|null
- $advertId : int
- $currencyId : int|null
- $deleted : bool
- $email : string
- $id : int|null
- $insertDatetime : DateTime
- $insertIp : string|null
- $messageThreadId : int|null
- $phone : string|null
- $price : string|null
- $read : bool
- $readKey : string|null
- $subject : string|null
- $text : string
- $user : User|null
- Response sender (owns the column `cms_system_users_user_id`; `userId` is read-only).
- $userId : int|null
Methods
- __construct() : mixed
- callInitMethods() : void
- Calls `init{TraitName}()` for every used trait that defines such a method.
- getAdvert() : TAdvert|null
- getAdvertId() : int
- getAllTraits() : array<string, string>
- Returns all traits the class uses, including those used by parent classes and nested traits.
- getCurrencyId() : int|null
- getDeleted() : bool
- getEmail() : string
- getId() : int|null
- getInsertDatetime() : DateTime
- getInsertIp() : string|null
- getMessageThreadId() : int|null
- getOwnerUserId() : int|null
- Returns the id of the user who created the record; `null` for an unknown or anonymous owner.
- getPhone() : string|null
- getPrice() : string|null
- getPriceAsFloat() : float|null
- getRead() : bool
- getReadKey() : string|null
- getSubject() : string|null
- getText() : string
- getUser() : User|null
- getUserId() : int|null
- isDeleted() : bool
- isPersisted() : bool
- isRead() : bool
- setAdvert() : $this
- setAdvertId() : $this
- setCurrencyId() : $this
- setDeleted() : $this
- setEmail() : $this
- setId() : $this
- setInsertDatetime() : $this
- setInsertIp() : $this
- setMessageThreadId() : $this
- setPhone() : $this
- setPrice() : $this
- setPriceFromFloat() : $this
- setRead() : $this
- setReadKey() : static
- setSubject() : $this
- setText() : $this
- setUser() : self
- setUserId() : $this
- getTraitsRecursive() : array<string, string>
- Walks the trait list recursively and collects nested traits too.
Properties
$advert
protected
TAdvert|null
$advert
= null
Attributes
- #[FieldAccess]
- $read: \App\Core\Attributes\Hydration\Audience::All
- $insert: \App\Core\Attributes\Hydration\Audience::All
- $update: \App\Core\Attributes\Hydration\Audience::Privileged
- #[JoinColumn]
- $name: 'cms_mod_bazaar_adverts_advert_id'
- $referencedColumnName: 'advert_id'
- $nullable: true
- $onDelete: 'CASCADE'
- #[ManyToOne]
- $targetEntity: \App\UI\Api\Bazaar\Models\Entities\Advert::class
- $fetch: 'LAZY'
$advertId
protected
int
$advertId
= 0
Attributes
- #[Column]
- $name: 'cms_mod_bazaar_adverts_advert_id'
- $type: 'integer'
- $options: ['unsigned' => true]
- #[FieldAccess]
- $read: Audience::All
- $insert: Audience::All
- $update: Audience::Privileged
$currencyId
protected
int|null
$currencyId
= null
Attributes
- #[Column]
- $name: 'cms_system_currencies_currency_id'
- $type: 'integer'
- $nullable: true
- $options: ['unsigned' => true]
$deleted
protected
bool
$deleted
= false
Attributes
- #[Column]
- $name: 'deleted'
- $type: 'boolean'
protected
string
$email
= ''
Attributes
- #[Column]
- $name: 'email'
- $type: 'string'
- $length: 255
$id
protected
int|null
$id
= null
Attributes
- #[Column]
- $name: 'advert_response_id'
- $type: 'integer'
- $options: ['unsigned' => true]
- #[GeneratedValue]
- #[Id]
$insertDatetime
protected
DateTime
$insertDatetime
= new DateTime()
Attributes
- #[Column]
- $name: 'insert_datetime'
- $type: 'datetime'
$insertIp
protected
string|null
$insertIp
= null
Attributes
- #[Column]
- $name: 'insert_ip'
- $type: 'string'
- $length: 45
- $nullable: true
- #[PersonalData]
- PersonalDataKind::Hidden
$messageThreadId
protected
int|null
$messageThreadId
= null
Attributes
- #[Column]
- $name: 'cms_mod_base_message_threads_message_thread_id'
- $type: 'integer'
- $nullable: true
- $options: ['unsigned' => true]
$phone
protected
string|null
$phone
= null
Attributes
- #[Column]
- $name: 'phone'
- $type: 'string'
- $length: 255
- $nullable: true
$price
protected
string|null
$price
= null
Attributes
- #[Column]
- $name: 'price'
- $type: 'decimal'
- $precision: 10
- $scale: 3
- $nullable: true
$read
protected
bool
$read
= false
Attributes
- #[Column]
- $name: '`read`'
- $type: 'boolean'
- #[ConditionallyUpdatable]
- $check: 'checkPermissionForRead'
- #[FieldAccess]
- $read: Audience::All
- $insert: Audience::Privileged
- $update: Audience::Privileged
$readKey
protected
string|null
$readKey
= null
Attributes
- #[Column]
- $name: 'read_key'
- $type: 'string'
- $length: 64
- $nullable: true
- #[FieldAccess]
- $read: Audience::Internal
- $insert: Audience::All
- $update: Audience::All
$subject
protected
string|null
$subject
= null
Attributes
- #[Column]
- $name: 'subject'
- $type: 'string'
- $length: 255
- $nullable: true
$text
protected
string
$text
= ''
Attributes
- #[Column]
- $name: 'text'
- $type: 'text'
$user
Response sender (owns the column `cms_system_users_user_id`; `userId` is read-only).
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
- $options: ['unsigned' => true]
Methods
__construct()
public
__construct([int|null $id = null ][, int $advertId = 0 ][, string $email = '' ][, string|null $phone = null ][, string|null $subject = null ][, string $text = '' ][, int|null $userId = null ][, DateTime $insertDatetime = new DateTime() ][, string|null $insertIp = null ][, bool $read = false ][, bool $deleted = false ][, string|null $price = null ][, int|null $currencyId = null ][, int|null $messageThreadId = null ][, string|null $readKey = null ]) : mixed
Parameters
- $id : int|null = null
- $advertId : int = 0
- $email : string = ''
- $phone : string|null = null
- $subject : string|null = null
- $text : string = ''
- $userId : int|null = null
- $insertDatetime : DateTime = new DateTime()
- $insertIp : string|null = null
- $read : bool = false
- $deleted : bool = false
- $price : string|null = null
- $currencyId : int|null = null
- $messageThreadId : int|null = null
- $readKey : string|null = null
callInitMethods()
Calls `init{TraitName}()` for every used trait that defines such a method.
public
callInitMethods() : void
getAdvert()
public
getAdvert() : TAdvert|null
Return values
TAdvert|nullgetAdvertId()
public
getAdvertId() : int
Return values
intgetAllTraits()
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>getCurrencyId()
public
getCurrencyId() : int|null
Return values
int|nullgetDeleted()
public
getDeleted() : bool
Return values
boolgetEmail()
public
getEmail() : string
Return values
stringgetId()
public
getId() : int|null
Return values
int|nullgetInsertDatetime()
public
getInsertDatetime() : DateTime
Return values
DateTimegetInsertIp()
public
getInsertIp() : string|null
Return values
string|nullgetMessageThreadId()
public
getMessageThreadId() : int|null
Return values
int|nullgetOwnerUserId()
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|nullgetPrice()
public
getPrice() : string|null
Return values
string|nullgetPriceAsFloat()
public
getPriceAsFloat() : float|null
Return values
float|nullgetRead()
public
getRead() : bool
Return values
boolgetReadKey()
public
getReadKey() : string|null
Return values
string|nullgetSubject()
public
getSubject() : string|null
Return values
string|nullgetText()
public
getText() : string
Return values
stringgetUser()
public
getUser() : User|null
Return values
User|nullgetUserId()
public
getUserId() : int|null
Return values
int|nullisDeleted()
public
isDeleted() : bool
Return values
boolisPersisted()
public
isPersisted() : bool
Return values
boolisRead()
public
isRead() : bool
Return values
boolsetAdvert()
public
setAdvert(TAdvert|null $advert) : $this
Parameters
- $advert : TAdvert|null
Return values
$thissetAdvertId()
public
setAdvertId(int $advertId) : $this
Parameters
- $advertId : int
Return values
$thissetCurrencyId()
public
setCurrencyId(int|null $currencyId) : $this
Parameters
- $currencyId : int|null
Return values
$thissetDeleted()
public
setDeleted(bool $deleted) : $this
Parameters
- $deleted : bool
Return values
$thissetEmail()
public
setEmail(string $email) : $this
Parameters
- $email : string
Return values
$thissetId()
public
setId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thissetInsertDatetime()
public
setInsertDatetime(DateTime $insertDatetime) : $this
Parameters
- $insertDatetime : DateTime
Return values
$thissetInsertIp()
public
setInsertIp(string|null $insertIp) : $this
Parameters
- $insertIp : string|null
Return values
$thissetMessageThreadId()
public
setMessageThreadId(int|null $messageThreadId) : $this
Parameters
- $messageThreadId : int|null
Return values
$thissetPhone()
public
setPhone(string|null $phone) : $this
Parameters
- $phone : string|null
Return values
$thissetPrice()
public
setPrice(string|null $price) : $this
Parameters
- $price : string|null
Return values
$thissetPriceFromFloat()
public
setPriceFromFloat(float|null $price) : $this
Parameters
- $price : float|null
Return values
$thissetRead()
public
setRead(bool $read) : $this
Parameters
- $read : bool
Return values
$thissetReadKey()
public
setReadKey(string|null $readKey) : static
Parameters
- $readKey : string|null
Return values
staticsetSubject()
public
setSubject(string|null $subject) : $this
Parameters
- $subject : string|null
Return values
$thissetText()
public
setText(string $text) : $this
Parameters
- $text : string
Return values
$thissetUser()
public
setUser(User|null $user) : self
Parameters
- $user : User|null
Return values
selfsetUserId()
public
setUserId(int|null $userId) : $this
Parameters
- $userId : 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>