ComplaintFileRel
extends ComplaintFileRel
in package
Complaint attachment: a rel to the shared System `File` (composite PK complaint + file, like Bazaar `AdvertFileRel`). The path is never built by hand but taken from `File::getFullPath()`. `removed` is a soft delete (as in `AdvertFileRel`), so multi-upload deletes one file at a time without losing the order of the remaining ones.
Tags
Attributes
- #[Entity]
- #[Table]
- $name: 'cms_mod_eshop_complaint_files'
- #[TableAlias]
- 'complaintFileRel'
Table of Contents
Properties
- $complaint : TComplaint|null
- $file : TFile|null
- $order : int
- $removed : bool
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.
- getComplaint() : TComplaint|null
- getFile() : TFile|null
- getOrder() : int
- getRemoved() : bool
- isRemoved() : bool
- setComplaint() : $this
- setFile() : $this
- setOrder() : $this
- setRemoved() : $this
- getTraitsRecursive() : array<string, string>
- Walks the trait list recursively and collects nested traits too.
Properties
$complaint
protected
TComplaint|null
$complaint
= null
Attributes
- #[Id]
- #[JoinColumn]
- $name: 'cms_mod_eshop_complaints_complaint_id'
- $referencedColumnName: 'complaint_id'
- $onDelete: 'CASCADE'
- #[ManyToOne]
- $targetEntity: \App\UI\Api\Eshop\Models\Entities\Complaint::class
- $inversedBy: 'files'
$file
protected
TFile|null
$file
= null
Attributes
- #[Id]
- #[JoinColumn]
- $name: 'cms_system_files_file_id'
- $referencedColumnName: 'file_id'
- $onDelete: 'CASCADE'
- #[ManyToOne]
- $targetEntity: \App\UI\Api\System\Models\Entities\File::class
$order
protected
int
$order
= 1
Attributes
- #[Column]
- $name: '`order`'
- $type: 'integer'
$removed
protected
bool
$removed
= false
Attributes
- #[Column]
- $name: 'removed'
- $type: 'boolean'
Methods
__construct()
public
__construct([mixed $complaint = null ][, mixed $file = null ][, int $order = 1 ][, bool $removed = false ]) : mixed
Parameters
- $complaint : mixed = null
- $file : mixed = null
- $order : int = 1
- $removed : bool = false
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>getComplaint()
public
getComplaint() : TComplaint|null
Return values
TComplaint|nullgetFile()
public
getFile() : TFile|null
Return values
TFile|nullgetOrder()
public
getOrder() : int
Return values
intgetRemoved()
public
getRemoved() : bool
Return values
boolisRemoved()
public
isRemoved() : bool
Return values
boolsetComplaint()
public
setComplaint(TComplaint|null $complaint) : $this
Parameters
- $complaint : TComplaint|null
Return values
$thissetFile()
public
setFile(TFile|null $file) : $this
Parameters
- $file : TFile|null
Return values
$thissetOrder()
public
setOrder(int $order) : $this
Parameters
- $order : int
Return values
$thissetRemoved()
public
setRemoved(bool $removed) : $this
Parameters
- $removed : bool
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>