CoolCMS API

Complaint extends Complaint
in package

Complaint aggregate. The state is a single FK to {@see ComplaintStatus}, with no separate enum column.

Tags
extends
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
#[ExternalReadonly]

$files

protected Collection $files
Attributes
#[CollectionOf]
\App\UI\Admin\Eshop\Models\Entities\ComplaintFileRel::class
$owned: true
#[OneToMany]
$targetEntity: \App\UI\Admin\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'
#[ExternalReadonly]

$items

protected Collection $items
Attributes
#[CollectionOf]
\App\UI\Admin\Eshop\Models\Entities\ComplaintItem::class
$owned: true
#[OneToMany]
$targetEntity: \App\UI\Admin\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
#[EntityOf]
\App\UI\Admin\Eshop\Models\Entities\Order::class
#[JoinColumn]
$name: 'cms_mod_eshop_orders_order_id'
$referencedColumnName: 'order_id'
$nullable: true
$onDelete: 'SET NULL'
#[ManyToOne]
$targetEntity: \App\UI\Admin\Eshop\Models\Entities\Order::class
$fetch: 'LAZY'

$preferredSolution

protected TPreferredSolution|null $preferredSolution = null

solution preferred by the customer

Attributes
#[EntityOf]
\App\UI\Admin\Eshop\Models\Entities\ComplaintSolution::class
#[JoinColumn]
$name: 'cms_mod_eshop_complaint_solutions_solution_id_preferred'
$referencedColumnName: 'complaint_solution_id'
$nullable: true
$onDelete: 'SET NULL'
#[ManyToOne]
$targetEntity: \App\UI\Admin\Eshop\Models\Entities\ComplaintSolution::class
$fetch: 'LAZY'

$receiptDatetime

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

$solution

protected TSolution|null $solution = null

solution chosen by the admin

Attributes
#[EntityOf]
\App\UI\Admin\Eshop\Models\Entities\ComplaintSolution::class
#[JoinColumn]
$name: 'cms_mod_eshop_complaint_solutions_complaint_solution_id'
$referencedColumnName: 'complaint_solution_id'
$nullable: true
$onDelete: 'SET NULL'
#[ManyToOne]
$targetEntity: \App\UI\Admin\Eshop\Models\Entities\ComplaintSolution::class
$fetch: 'LAZY'

$status

protected TStatus|null $status = null
Attributes
#[EntityOf]
\App\UI\Admin\Eshop\Models\Entities\ComplaintStatus::class
#[JoinColumn]
$name: 'cms_mod_eshop_complaint_statuses_complaint_status_id'
$referencedColumnName: 'complaint_status_id'
$nullable: true
$onDelete: 'SET NULL'
#[ManyToOne]
$targetEntity: \App\UI\Admin\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
#[ExternalReadonly]

$updateDatetime

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

$user

protected TUser|null $user = null
Attributes
#[EntityOf]
\App\UI\Admin\System\Models\Entities\User::class
#[JoinColumn]
$name: 'cms_system_users_user_id'
$referencedColumnName: 'user_id'
$nullable: true
$onDelete: 'SET NULL'
#[ManyToOne]
$targetEntity: \App\UI\Admin\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
$this

addItem()

public addItem(TItem $item) : $this
Parameters
$item : TItem
Return values
$this

callInitMethods()

Calls `init{TraitName}()` for every used trait that defines such a method.

public callInitMethods() : void

getAdminNote()

public getAdminNote() : string|null
Return values
string|null

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>

getCustomerCity()

public getCustomerCity() : string|null
Return values
string|null

getCustomerEmail()

public getCustomerEmail() : string|null
Return values
string|null

getCustomerFirstname()

public getCustomerFirstname() : string|null
Return values
string|null

getCustomerLastname()

public getCustomerLastname() : string|null
Return values
string|null

getCustomerPhone()

public getCustomerPhone() : string|null
Return values
string|null

getCustomerPostcode()

public getCustomerPostcode() : string|null
Return values
string|null

getCustomerStreet()

public getCustomerStreet() : string|null
Return values
string|null

getDescription()

public getDescription() : string|null
Return values
string|null

getExpirationDate()

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

getFiles()

public getFiles() : Collection<int, TFileRel>
Return values
Collection<int, TFileRel>

getInsertDatetime()

public getInsertDatetime() : DateTime
Return values
DateTime

getItems()

public getItems() : Collection<int, TItem>
Return values
Collection<int, TItem>

getOrder()

public getOrder() : TOrder|null
Return values
TOrder|null

getPreferredSolution()

public getPreferredSolution() : TPreferredSolution|null
Return values
TPreferredSolution|null

getReceiptDatetime()

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

getSolution()

public getSolution() : TSolution|null
Return values
TSolution|null

getStatus()

public getStatus() : TStatus|null
Return values
TStatus|null

getStockDocumentId()

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

getUpdateDatetime()

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

getUser()

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

removeFile()

public removeFile(TFileRel $file) : $this
Parameters
$file : TFileRel
Return values
$this

removeItem()

public removeItem(TItem $item) : $this
Parameters
$item : TItem
Return values
$this

setAdminNote()

public setAdminNote(string|null $adminNote) : $this
Parameters
$adminNote : string|null
Return values
$this

setCustomerCity()

public setCustomerCity(string|null $customerCity) : $this
Parameters
$customerCity : string|null
Return values
$this

setCustomerEmail()

public setCustomerEmail(string|null $customerEmail) : $this
Parameters
$customerEmail : string|null
Return values
$this

setCustomerFirstname()

public setCustomerFirstname(string|null $customerFirstname) : $this
Parameters
$customerFirstname : string|null
Return values
$this

setCustomerLastname()

public setCustomerLastname(string|null $customerLastname) : $this
Parameters
$customerLastname : string|null
Return values
$this

setCustomerPhone()

public setCustomerPhone(string|null $customerPhone) : $this
Parameters
$customerPhone : string|null
Return values
$this

setCustomerPostcode()

public setCustomerPostcode(string|null $customerPostcode) : $this
Parameters
$customerPostcode : string|null
Return values
$this

setCustomerStreet()

public setCustomerStreet(string|null $customerStreet) : $this
Parameters
$customerStreet : string|null
Return values
$this

setDescription()

public setDescription(string|null $description) : $this
Parameters
$description : string|null
Return values
$this

setExpirationDate()

public setExpirationDate(DateTime|null $expirationDate) : $this
Parameters
$expirationDate : DateTime|null
Return values
$this

setFiles()

public setFiles(Collection<int, TFileRel>|array<int, TFileRel> $files) : $this
Parameters
$files : Collection<int, TFileRel>|array<int, TFileRel>
Return values
$this

setId()

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

setInsertDatetime()

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

setItems()

public setItems(Collection<int, TItem>|array<int, TItem> $items) : $this
Parameters
$items : Collection<int, TItem>|array<int, TItem>
Return values
$this

setOrder()

public setOrder(TOrder|null $order) : $this
Parameters
$order : TOrder|null
Return values
$this

setPreferredSolution()

public setPreferredSolution(TPreferredSolution|null $preferredSolution) : $this
Parameters
$preferredSolution : TPreferredSolution|null
Return values
$this

setReceiptDatetime()

public setReceiptDatetime(DateTime|null $receiptDatetime) : $this
Parameters
$receiptDatetime : DateTime|null
Return values
$this

setSolution()

public setSolution(TSolution|null $solution) : $this
Parameters
$solution : TSolution|null
Return values
$this

setStatus()

public setStatus(TStatus|null $status) : $this
Parameters
$status : TStatus|null
Return values
$this

setStockDocumentId()

public setStockDocumentId(int|null $stockDocumentId) : $this
Parameters
$stockDocumentId : int|null
Return values
$this

setUpdateDatetime()

public setUpdateDatetime(DateTime|null $updateDatetime) : $this
Parameters
$updateDatetime : DateTime|null
Return values
$this

setUser()

public setUser(TUser|null $user) : $this
Parameters
$user : TUser|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