CoolCMS API

CurrencyText extends CurrencyText
in package

Currency translations (cms_system_currency_texts): per-language name, description and pluralized label after the amount. The `shortcut` is not translated; it is the defined currency key for payment gateways and stays on {@see Currency}.

Derived identity: languageId + association to the currency (#[ORM\Id] on the many-to-one in the UI variant, see PaymentRegionText).

Attributes
#[Entity]
#[Table]
$name: 'cms_system_currency_texts'
#[TableAlias]
'currencyText'

Table of Contents

Properties

$activeTranslation  : bool
$description  : string|null
$languageId  : int|null
$name  : string
$parent  : mixed
$unitLabel  : string|null

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.
getDescription()  : string|null
getLanguageId()  : int|null
Translation language; null only for a new entity before `setLanguageId()`.
getName()  : string
getParent()  : object|null
getUnitLabel()  : string|null
isActiveTranslation()  : bool
setActiveTranslation()  : $this
setDescription()  : $this
setLanguageId()  : $this
setName()  : $this
setParent()  : static
setUnitLabel()  : $this
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'

$description

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

$languageId

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

$name

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

$parent

protected mixed $parent = null
Attributes
#[EntityOf]
\App\UI\Front\System\Models\Entities\Currency::class
#[Id]
#[Identity]
#[JoinColumn]
$name: 'cms_system_currencies_currency_id'
$referencedColumnName: 'currency_id'
$onDelete: 'CASCADE'
#[ManyToOne]
$targetEntity: \App\UI\Front\System\Models\Entities\Currency::class
$inversedBy: 'translations'

$unitLabel

protected string|null $unitLabel = null
Attributes
#[Column]
$name: 'unit_label'
$type: 'string'
$length: 191
$nullable: true

Methods

__construct()

public __construct([int|null $languageId = null ][, string $name = '' ][, string|null $description = null ][, string|null $unitLabel = null ][, bool $activeTranslation = true ]) : mixed
Parameters
$languageId : int|null = null
$name : string = ''
$description : string|null = null
$unitLabel : 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>

getDescription()

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

getLanguageId()

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

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

getName()

public getName() : string
Return values
string

getUnitLabel()

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

setActiveTranslation()

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

setDescription()

public setDescription(string|null $description) : $this
Parameters
$description : 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

setUnitLabel()

public setUnitLabel(string|null $unitLabel) : $this
Parameters
$unitLabel : string|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