CoolCMS API

ComplaintStatusText extends BaseEntity
in package
implements TranslationInterface uses TranslationLanguageTrait, ActiveTranslationTrait

AbstractYes

Complaint status text: besides the name it carries the e-mail template (`emailSubject`/`emailBody`) that {@see \App\UI\Api\Eshop\Models\Generators\ComplaintEmailGenerator} sends to the customer on a transition into a status with the `sendEmail` flag (like `OrderStatusText`).

Tags
template
Attributes
#[MappedSuperclass]
#[TableAlias]
$alias: 'complaintStatusText'

Table of Contents

Interfaces

TranslationInterface
Translation entity (`*Text`): one row of parent texts for one language.

Properties

$activeTranslation  : bool
$emailBody  : string|null
$emailSubject  : string|null
$languageId  : int|null
$name  : string
$parent  : object|null
Parent entity of the translation (the second part of the derived identity next to `languageId`).

Methods

__construct()  : mixed
callInitMethods()  : void
Calls `init{TraitName}()` for every used trait that defines such a method.
getActiveTranslation()  : bool
getAllTraits()  : array<string, string>
Returns all traits the class uses, including those used by parent classes and nested traits.
getEmailBody()  : string|null
getEmailSubject()  : string|null
getLanguageId()  : int|null
Translation language; null only for a new entity before `setLanguageId()`.
getName()  : string
getParent()  : object|null
isActiveTranslation()  : bool
setActiveTranslation()  : $this
setEmailBody()  : $this
setEmailSubject()  : $this
setLanguageId()  : $this
setName()  : $this
setParent()  : static
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$activeTranslation

protected bool $activeTranslation = true
Attributes
#[Column]
$name: 'active_translation'
$type: 'boolean'

$emailBody

protected string|null $emailBody = null
Attributes
#[Column]
$name: 'email_body'
$type: 'text'
$nullable: true

$emailSubject

protected string|null $emailSubject = null
Attributes
#[Column]
$name: 'email_subject'
$type: 'string'
$length: 255
$nullable: true

$languageId

protected int|null $languageId = null
Attributes
#[Column]
$name: 'cms_system_languages_language_id'
$type: 'integer'
$options: ['unsigned' => true]
#[Id]

$name

protected string $name = ''
Attributes
#[Column]
$name: 'name'
$type: 'string'
$length: 255

$parent

Parent entity of the translation (the second part of the derived identity next to `languageId`).

protected object|null $parent = null

The property is untyped on purpose: the UI variant supplies the concrete type and ORM mapping by redeclaring protected $parent = null;, as *Rel join entities do. The null default prevents a "typed property must not be accessed before initialization" error when the identity is read.

Methods

__construct()

public __construct([int|null $languageId = null ][, string $name = '' ][, string|null $emailSubject = null ][, string|null $emailBody = null ][, bool $activeTranslation = true ]) : mixed
Parameters
$languageId : int|null = null
$name : string = ''
$emailSubject : string|null = null
$emailBody : string|null = null
$activeTranslation : bool = true

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>

getLanguageId()

Translation language; null only for a new entity before `setLanguageId()`.

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

setActiveTranslation()

public setActiveTranslation(bool $activeTranslation) : $this
Parameters
$activeTranslation : bool
Return values
$this

setEmailBody()

public setEmailBody(string|null $emailBody) : $this
Parameters
$emailBody : string|null
Return values
$this

setEmailSubject()

public setEmailSubject(string|null $emailSubject) : $this
Parameters
$emailSubject : string|null
Return values
$this

setLanguageId()

public setLanguageId(int $languageId) : $this
Parameters
$languageId : int
Return values
$this

setName()

public setName(string $name) : $this
Parameters
$name : string
Return values
$this

setParent()

public setParent(object|null $parent) : static
Parameters
$parent : object|null
Return values
static

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