Complaint
extends Complaint
in package
Complaint aggregate. The state is a single FK to {@see ComplaintStatus}, with no separate enum column.
Tags
Attributes
- #[Entity]
- #[Table]
- $name: 'cms_mod_eshop_complaints'
- #[TableAlias]
- 'complaint'
Table of Contents
Properties
- $adminNote : string|null
- $customerCity : string|null
- $customerEmail : string|null
- $customerFirstname : string|null
- $customerLastname : string|null
- $customerPhone : string|null
- $customerPostcode : string|null
- $customerStreet : string|null
- $description : string|null
- $expirationDate : DateTime|null
- $files : Collection
- $id : int|null
- $insertDatetime : DateTime
- $items : Collection
- $order : TOrder|null
- $preferredSolution : TPreferredSolution|null
- $receiptDatetime : DateTime|null
- $solution : TSolution|null
- $status : TStatus|null
- $stockDocumentId : int|null
- $updateDatetime : DateTime|null
- $user : TUser|null
Methods
- __construct() : mixed
- addFile() : $this
- addItem() : $this
- callInitMethods() : void
- Calls `init{TraitName}()` for every used trait that defines such a method.
- getAdminNote() : string|null
- getAllTraits() : array<string, string>
- Returns all traits the class uses, including those used by parent classes and nested traits.
- getCustomerCity() : string|null
- getCustomerEmail() : string|null
- getCustomerFirstname() : string|null
- getCustomerLastname() : string|null
- getCustomerPhone() : string|null
- getCustomerPostcode() : string|null
- getCustomerStreet() : string|null
- getDescription() : string|null
- getExpirationDate() : DateTime|null
- getFiles() : Collection<int, TFileRel>
- getId() : int|null
- getInsertDatetime() : DateTime
- getItems() : Collection<int, TItem>
- getOrder() : TOrder|null
- getOwnerUserId() : int|null
- getPreferredSolution() : TPreferredSolution|null
- getReceiptDatetime() : DateTime|null
- getSolution() : TSolution|null
- getStatus() : TStatus|null
- getStockDocumentId() : int|null
- getUpdateDatetime() : DateTime|null
- getUser() : TUser|null
- isPersisted() : bool
- removeFile() : $this
- removeItem() : $this
- setAdminNote() : $this
- setCustomerCity() : $this
- setCustomerEmail() : $this
- setCustomerFirstname() : $this
- setCustomerLastname() : $this
- setCustomerPhone() : $this
- setCustomerPostcode() : $this
- setCustomerStreet() : $this
- setDescription() : $this
- setExpirationDate() : $this
- setFiles() : $this
- setId() : $this
- setInsertDatetime() : $this
- setItems() : $this
- setOrder() : $this
- setPreferredSolution() : $this
- setReceiptDatetime() : $this
- setSolution() : $this
- setStatus() : $this
- setStockDocumentId() : $this
- setUpdateDatetime() : $this
- setUser() : $this
- getTraitsRecursive() : array<string, string>
- Walks the trait list recursively and collects nested traits too.
Properties
$adminNote
protected
string|null
$adminNote
= null
Attributes
- #[Column]
- $name: 'admin_note'
- $type: 'text'
- $nullable: true
$customerCity
protected
string|null
$customerCity
= null
Attributes
- #[Column]
- $name: 'customer_city'
- $type: 'string'
- $length: 255
- $nullable: true
$customerEmail
protected
string|null
$customerEmail
= null
Attributes
- #[Column]
- $name: 'customer_email'
- $type: 'string'
- $length: 255
- $nullable: true
$customerFirstname
protected
string|null
$customerFirstname
= null
Attributes
- #[Column]
- $name: 'customer_firstname'
- $type: 'string'
- $length: 255
- $nullable: true
$customerLastname
protected
string|null
$customerLastname
= null
Attributes
- #[Column]
- $name: 'customer_lastname'
- $type: 'string'
- $length: 255
- $nullable: true
$customerPhone
protected
string|null
$customerPhone
= null
Attributes
- #[Column]
- $name: 'customer_phone'
- $type: 'string'
- $length: 255
- $nullable: true
$customerPostcode
protected
string|null
$customerPostcode
= null
Attributes
- #[Column]
- $name: 'customer_postcode'
- $type: 'string'
- $length: 20
- $nullable: true
$customerStreet
protected
string|null
$customerStreet
= null
Attributes
- #[Column]
- $name: 'customer_street'
- $type: 'string'
- $length: 255
- $nullable: true
$description
protected
string|null
$description
= null
Attributes
- #[Column]
- $name: 'description'
- $type: 'text'
- $nullable: true
$expirationDate
protected
DateTime|null
$expirationDate
= null
Attributes
- #[Column]
- $name: 'expiration_date'
- $type: 'date'
- $nullable: true
$files
protected
Collection
$files
Attributes
- #[OneToMany]
- $targetEntity: \App\UI\Api\Eshop\Models\Entities\ComplaintFileRel::class
- $mappedBy: 'complaint'
- $cascade: ['persist', 'remove']
- $orphanRemoval: true
- $fetch: 'LAZY'
$id
protected
int|null
$id
= null
Attributes
- #[Column]
- $name: 'complaint_id'
- $type: 'integer'
- $options: ['unsigned' => true]
- #[GeneratedValue]
- #[Id]
$insertDatetime
protected
DateTime
$insertDatetime
= new DateTime()
Attributes
- #[Column]
- $name: 'insert_datetime'
- $type: 'datetime'
$items
protected
Collection
$items
Attributes
- #[OneToMany]
- $targetEntity: \App\UI\Api\Eshop\Models\Entities\ComplaintItem::class
- $mappedBy: 'complaint'
- $cascade: ['persist', 'remove']
- $orphanRemoval: true
- $fetch: 'LAZY'
$order
protected
TOrder|null
$order
= null
reference; the snapshot survives deleting the order (SET NULL)
Attributes
- #[JoinColumn]
- $name: 'cms_mod_eshop_orders_order_id'
- $referencedColumnName: 'order_id'
- $nullable: true
- $onDelete: 'SET NULL'
- #[ManyToOne]
- $targetEntity: \App\UI\Api\Eshop\Models\Entities\Order::class
- $fetch: 'LAZY'
$preferredSolution
protected
TPreferredSolution|null
$preferredSolution
= null
solution preferred by the customer
Attributes
- #[JoinColumn]
- $name: 'cms_mod_eshop_complaint_solutions_solution_id_preferred'
- $referencedColumnName: 'complaint_solution_id'
- $nullable: true
- $onDelete: 'SET NULL'
- #[ManyToOne]
- $targetEntity: \App\UI\Api\Eshop\Models\Entities\ComplaintSolution::class
- $fetch: 'LAZY'
$receiptDatetime
protected
DateTime|null
$receiptDatetime
= null
Attributes
- #[Column]
- $name: 'receipt_datetime'
- $type: 'datetime'
- $nullable: true
$solution
protected
TSolution|null
$solution
= null
solution chosen by the admin
Attributes
- #[JoinColumn]
- $name: 'cms_mod_eshop_complaint_solutions_complaint_solution_id'
- $referencedColumnName: 'complaint_solution_id'
- $nullable: true
- $onDelete: 'SET NULL'
- #[ManyToOne]
- $targetEntity: \App\UI\Api\Eshop\Models\Entities\ComplaintSolution::class
- $fetch: 'LAZY'
$status
protected
TStatus|null
$status
= null
Attributes
- #[JoinColumn]
- $name: 'cms_mod_eshop_complaint_statuses_complaint_status_id'
- $referencedColumnName: 'complaint_status_id'
- $nullable: true
- $onDelete: 'SET NULL'
- #[ManyToOne]
- $targetEntity: \App\UI\Api\Eshop\Models\Entities\ComplaintStatus::class
- $fetch: 'LAZY'
$stockDocumentId
protected
int|null
$stockDocumentId
= null
Attributes
- #[Column]
- $name: 'stock_document_id'
- $type: 'integer'
- $options: ['unsigned' => true]
- $nullable: true
$updateDatetime
protected
DateTime|null
$updateDatetime
= null
Attributes
- #[Column]
- $name: 'update_datetime'
- $type: 'datetime'
- $nullable: true
$user
protected
TUser|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'
Methods
__construct()
public
__construct([int|null $id = null ][, mixed $order = null ][, mixed $user = null ][, mixed $status = null ][, mixed $solution = null ][, mixed $preferredSolution = null ][, string|null $description = null ][, string|null $adminNote = null ][, string|null $customerEmail = null ][, string|null $customerFirstname = null ][, string|null $customerLastname = null ][, string|null $customerPhone = null ][, string|null $customerStreet = null ][, string|null $customerCity = null ][, string|null $customerPostcode = null ][, DateTime|null $receiptDatetime = null ][, DateTime|null $expirationDate = null ][, int|null $stockDocumentId = null ][, DateTime $insertDatetime = new DateTime() ][, DateTime|null $updateDatetime = null ][, Collection $items = new ArrayCollection() ][, Collection $files = new ArrayCollection() ]) : mixed
Parameters
- $id : int|null = null
- $order : mixed = null
- $user : mixed = null
- $status : mixed = null
- $solution : mixed = null
- $preferredSolution : mixed = null
- $description : string|null = null
- $adminNote : string|null = null
- $customerEmail : string|null = null
- $customerFirstname : string|null = null
- $customerLastname : string|null = null
- $customerPhone : string|null = null
- $customerStreet : string|null = null
- $customerCity : string|null = null
- $customerPostcode : string|null = null
- $receiptDatetime : DateTime|null = null
- $expirationDate : DateTime|null = null
- $stockDocumentId : int|null = null
- $insertDatetime : DateTime = new DateTime()
- $updateDatetime : DateTime|null = null
- $items : Collection = new ArrayCollection()
- $files : Collection = new ArrayCollection()
addFile()
public
addFile(TFileRel $file) : $this
Parameters
- $file : TFileRel
Return values
$thisaddItem()
public
addItem(TItem $item) : $this
Parameters
- $item : TItem
Return values
$thiscallInitMethods()
Calls `init{TraitName}()` for every used trait that defines such a method.
public
callInitMethods() : void
getAdminNote()
public
getAdminNote() : string|null
Return values
string|nullgetAllTraits()
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>getCustomerCity()
public
getCustomerCity() : string|null
Return values
string|nullgetCustomerEmail()
public
getCustomerEmail() : string|null
Return values
string|nullgetCustomerFirstname()
public
getCustomerFirstname() : string|null
Return values
string|nullgetCustomerLastname()
public
getCustomerLastname() : string|null
Return values
string|nullgetCustomerPhone()
public
getCustomerPhone() : string|null
Return values
string|nullgetCustomerPostcode()
public
getCustomerPostcode() : string|null
Return values
string|nullgetCustomerStreet()
public
getCustomerStreet() : string|null
Return values
string|nullgetDescription()
public
getDescription() : string|null
Return values
string|nullgetExpirationDate()
public
getExpirationDate() : DateTime|null
Return values
DateTime|nullgetFiles()
public
getFiles() : Collection<int, TFileRel>
Return values
Collection<int, TFileRel>getId()
public
getId() : int|null
Return values
int|nullgetInsertDatetime()
public
getInsertDatetime() : DateTime
Return values
DateTimegetItems()
public
getItems() : Collection<int, TItem>
Return values
Collection<int, TItem>getOrder()
public
getOrder() : TOrder|null
Return values
TOrder|nullgetOwnerUserId()
public
getOwnerUserId() : int|null
Return values
int|nullgetPreferredSolution()
public
getPreferredSolution() : TPreferredSolution|null
Return values
TPreferredSolution|nullgetReceiptDatetime()
public
getReceiptDatetime() : DateTime|null
Return values
DateTime|nullgetSolution()
public
getSolution() : TSolution|null
Return values
TSolution|nullgetStatus()
public
getStatus() : TStatus|null
Return values
TStatus|nullgetStockDocumentId()
public
getStockDocumentId() : int|null
Return values
int|nullgetUpdateDatetime()
public
getUpdateDatetime() : DateTime|null
Return values
DateTime|nullgetUser()
public
getUser() : TUser|null
Return values
TUser|nullisPersisted()
public
isPersisted() : bool
Return values
boolremoveFile()
public
removeFile(TFileRel $file) : $this
Parameters
- $file : TFileRel
Return values
$thisremoveItem()
public
removeItem(TItem $item) : $this
Parameters
- $item : TItem
Return values
$thissetAdminNote()
public
setAdminNote(string|null $adminNote) : $this
Parameters
- $adminNote : string|null
Return values
$thissetCustomerCity()
public
setCustomerCity(string|null $customerCity) : $this
Parameters
- $customerCity : string|null
Return values
$thissetCustomerEmail()
public
setCustomerEmail(string|null $customerEmail) : $this
Parameters
- $customerEmail : string|null
Return values
$thissetCustomerFirstname()
public
setCustomerFirstname(string|null $customerFirstname) : $this
Parameters
- $customerFirstname : string|null
Return values
$thissetCustomerLastname()
public
setCustomerLastname(string|null $customerLastname) : $this
Parameters
- $customerLastname : string|null
Return values
$thissetCustomerPhone()
public
setCustomerPhone(string|null $customerPhone) : $this
Parameters
- $customerPhone : string|null
Return values
$thissetCustomerPostcode()
public
setCustomerPostcode(string|null $customerPostcode) : $this
Parameters
- $customerPostcode : string|null
Return values
$thissetCustomerStreet()
public
setCustomerStreet(string|null $customerStreet) : $this
Parameters
- $customerStreet : string|null
Return values
$thissetDescription()
public
setDescription(string|null $description) : $this
Parameters
- $description : string|null
Return values
$thissetExpirationDate()
public
setExpirationDate(DateTime|null $expirationDate) : $this
Parameters
- $expirationDate : DateTime|null
Return values
$thissetFiles()
public
setFiles(Collection<int, TFileRel>|array<int, TFileRel> $files) : $this
Parameters
- $files : Collection<int, TFileRel>|array<int, TFileRel>
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
$thissetItems()
public
setItems(Collection<int, TItem>|array<int, TItem> $items) : $this
Parameters
- $items : Collection<int, TItem>|array<int, TItem>
Return values
$thissetOrder()
public
setOrder(TOrder|null $order) : $this
Parameters
- $order : TOrder|null
Return values
$thissetPreferredSolution()
public
setPreferredSolution(TPreferredSolution|null $preferredSolution) : $this
Parameters
- $preferredSolution : TPreferredSolution|null
Return values
$thissetReceiptDatetime()
public
setReceiptDatetime(DateTime|null $receiptDatetime) : $this
Parameters
- $receiptDatetime : DateTime|null
Return values
$thissetSolution()
public
setSolution(TSolution|null $solution) : $this
Parameters
- $solution : TSolution|null
Return values
$thissetStatus()
public
setStatus(TStatus|null $status) : $this
Parameters
- $status : TStatus|null
Return values
$thissetStockDocumentId()
public
setStockDocumentId(int|null $stockDocumentId) : $this
Parameters
- $stockDocumentId : int|null
Return values
$thissetUpdateDatetime()
public
setUpdateDatetime(DateTime|null $updateDatetime) : $this
Parameters
- $updateDatetime : DateTime|null
Return values
$thissetUser()
public
setUser(TUser|null $user) : $this
Parameters
- $user : TUser|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>