Currency
extends Currency
in package
Attributes
- #[Entity]
- #[Table]
- $name: 'cms_system_currencies'
- #[TableAlias]
- 'currency'
Table of Contents
Properties
- $activated : bool
- $creditPrice : float
- $currencySymbolPosition : string
- $decimalSeparator : string
- $exchangeRate : float
- $id : int|null
- $internal : bool
- $key : string
- $monetary : bool
- $name : string
- $negativeSymbolPosition : string
- $noInvoicing : bool
- $orderRoundingWhole : bool
- $precision : int
- $separator : string
- $shortcut : string
- $showSuffix : bool
- $suffix : string
- $translations : Collection
Methods
- __construct() : mixed
- addTranslation() : $this
- 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.
- getCreditPrice() : float
- getCurrencySymbolPosition() : string
- getDecimalSeparator() : string
- getExchangeRate() : float
- getId() : int|null
- getInternal() : bool
- getKey() : string
- getName() : string
- getNegativeSymbolPosition() : string
- getNoInvoicing() : bool
- getPrecision() : int
- getSeparator() : string
- getShortcut() : string
- getShowSuffix() : bool
- getSuffix() : string
- getTranslation() : TTranslation|null
- getTranslations() : Collection<int, TTranslation>
- isActivated() : bool
- isInternal() : bool
- isMonetary() : bool
- isNoInvoicing() : bool
- isOrderRoundingWhole() : bool
- isPersisted() : bool
- isShowSuffix() : bool
- removeTranslation() : $this
- setActivated() : $this
- setCreditPrice() : $this
- setCurrencySymbolPosition() : $this
- setDecimalSeparator() : $this
- setExchangeRate() : $this
- setId() : $this
- setInternal() : $this
- setKey() : $this
- setMonetary() : $this
- setName() : $this
- setNegativeSymbolPosition() : $this
- setNoInvoicing() : $this
- setOrderRoundingWhole() : $this
- setPrecision() : $this
- setSeparator() : $this
- setShortcut() : $this
- setShowSuffix() : $this
- setSuffix() : $this
- setTranslations() : $this
- translationCollectionInit() : void
- getTraitsRecursive() : array<string, string>
- Walks the trait list recursively and collects nested traits too.
Properties
$activated
protected
bool
$activated
= true
Attributes
- #[Column]
- $name: 'activated'
- $type: 'boolean'
$creditPrice
protected
float
$creditPrice
= 0.0
Attributes
- #[Column]
- $name: 'credit_price'
- $type: 'decimal'
- $precision: 10
- $scale: 3
- $options: ['unsigned' => true]
$currencySymbolPosition
protected
string
$currencySymbolPosition
= 'b'
Attributes
- #[Column]
- $name: 'currency_symbol_position'
- $type: 'string'
$decimalSeparator
protected
string
$decimalSeparator
= ''
Attributes
- #[Column]
- $name: 'decimal_separator'
- $type: 'string'
- $length: 2
$exchangeRate
protected
float
$exchangeRate
= 0.0
Attributes
- #[Column]
- $name: 'exchange_rate'
- $type: 'decimal'
- $precision: 10
- $scale: 3
$id
protected
int|null
$id
= null
Attributes
- #[Column]
- $name: 'currency_id'
- $type: 'integer'
- $options: ['unsigned' => true]
- #[GeneratedValue]
- #[Id]
$internal
protected
bool
$internal
= false
Attributes
- #[Column]
- $name: 'internal'
- $type: 'boolean'
$key
protected
string
$key
= ''
Attributes
- #[Column]
- $name: '`key`'
- $type: 'string'
- $length: 10
$monetary
protected
bool
$monetary
= true
Attributes
- #[Column]
- $name: 'monetary'
- $type: 'boolean'
$name
protected
string
$name
= ''
Attributes
- #[Column]
- $name: 'name'
- $type: 'string'
- $length: 100
$negativeSymbolPosition
protected
string
$negativeSymbolPosition
= 'b'
Attributes
- #[Column]
- $name: 'negative_symbol_position'
- $type: 'string'
$noInvoicing
protected
bool
$noInvoicing
= false
Attributes
- #[Column]
- $name: 'no_invoicing'
- $type: 'boolean'
$orderRoundingWhole
protected
bool
$orderRoundingWhole
= false
Attributes
- #[Column]
- $name: 'order_rounding_whole'
- $type: 'boolean'
$precision
protected
int
$precision
= 2
Attributes
- #[Column]
- $name: 'precision'
- $type: 'integer'
- $options: ['unsigned' => true]
$separator
protected
string
$separator
= ''
Attributes
- #[Column]
- $name: 'separator'
- $type: 'string'
- $length: 2
$shortcut
protected
string
$shortcut
= ''
Attributes
- #[Column]
- $name: 'shortcut'
- $type: 'string'
- $length: 5
$showSuffix
protected
bool
$showSuffix
= true
Attributes
- #[Column]
- $name: 'show_suffix'
- $type: 'boolean'
$suffix
protected
string
$suffix
= ',-'
Attributes
- #[Column]
- $name: 'suffix'
- $type: 'string'
- $length: 10
- $options: ['default' => ',-']
$translations
protected
Collection
$translations
Attributes
- #[CollectionOf]
- \App\UI\Front\System\Models\Entities\CurrencyText::class
- $owned: true
- #[OneToMany]
- $targetEntity: \App\UI\Front\System\Models\Entities\CurrencyText::class
- $mappedBy: 'parent'
- $cascade: ["persist", "remove"]
- $orphanRemoval: true
- $fetch: "LAZY"
Methods
__construct()
public
__construct([int|null $id = null ][, string $name = '' ][, string $key = '' ][, string $shortcut = '' ][, float $exchangeRate = 0.0 ][, float $creditPrice = 0.0 ][, string $separator = '' ][, string $decimalSeparator = '' ][, int $precision = 2 ][, string $currencySymbolPosition = 'b' ][, string $negativeSymbolPosition = 'b' ][, bool $activated = true ][, bool $showSuffix = true ][, string $suffix = ',-' ][, Collection $translations = new ArrayCollection() ][, bool $noInvoicing = false ][, bool $internal = false ][, bool $monetary = true ][, bool $orderRoundingWhole = false ]) : mixed
Parameters
- $id : int|null = null
- $name : string = ''
- $key : string = ''
- $shortcut : string = ''
- $exchangeRate : float = 0.0
- $creditPrice : float = 0.0
- $separator : string = ''
- $decimalSeparator : string = ''
- $precision : int = 2
- $currencySymbolPosition : string = 'b'
- $negativeSymbolPosition : string = 'b'
- $activated : bool = true
- $showSuffix : bool = true
- $suffix : string = ',-'
- $translations : Collection = new ArrayCollection()
- $noInvoicing : bool = false
- $internal : bool = false
- $monetary : bool = true
- $orderRoundingWhole : bool = false
addTranslation()
public
addTranslation(TTranslation $translation) : $this
Parameters
- $translation : TTranslation
Return values
$thiscallInitMethods()
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>getCreditPrice()
public
getCreditPrice() : float
Return values
floatgetCurrencySymbolPosition()
public
getCurrencySymbolPosition() : string
Return values
stringgetDecimalSeparator()
public
getDecimalSeparator() : string
Return values
stringgetExchangeRate()
public
getExchangeRate() : float
Return values
floatgetId()
public
getId() : int|null
Return values
int|nullgetInternal()
public
getInternal() : bool
Return values
boolgetKey()
public
getKey() : string
Return values
stringgetName()
public
getName() : string
Return values
stringgetNegativeSymbolPosition()
public
getNegativeSymbolPosition() : string
Return values
stringgetNoInvoicing()
public
getNoInvoicing() : bool
Return values
boolgetPrecision()
public
getPrecision() : int
Return values
intgetSeparator()
public
getSeparator() : string
Return values
stringgetShortcut()
public
getShortcut() : string
Return values
stringgetShowSuffix()
public
getShowSuffix() : bool
Return values
boolgetSuffix()
public
getSuffix() : string
Return values
stringgetTranslation()
public
getTranslation(int $langId) : TTranslation|null
Parameters
- $langId : int
Return values
TTranslation|nullgetTranslations()
public
getTranslations() : Collection<int, TTranslation>
Return values
Collection<int, TTranslation>isActivated()
public
isActivated() : bool
Return values
boolisInternal()
public
isInternal() : bool
Return values
boolisMonetary()
public
isMonetary() : bool
Return values
boolisNoInvoicing()
public
isNoInvoicing() : bool
Return values
boolisOrderRoundingWhole()
public
isOrderRoundingWhole() : bool
Return values
boolisPersisted()
public
isPersisted() : bool
Return values
boolisShowSuffix()
public
isShowSuffix() : bool
Return values
boolremoveTranslation()
public
removeTranslation(TTranslation $translation) : $this
Parameters
- $translation : TTranslation
Return values
$thissetActivated()
public
setActivated(bool $activated) : $this
Parameters
- $activated : bool
Return values
$thissetCreditPrice()
public
setCreditPrice(float $creditPrice) : $this
Parameters
- $creditPrice : float
Return values
$thissetCurrencySymbolPosition()
public
setCurrencySymbolPosition(string $currencySymbolPosition) : $this
Parameters
- $currencySymbolPosition : string
Return values
$thissetDecimalSeparator()
public
setDecimalSeparator(string $decimalSeparator) : $this
Parameters
- $decimalSeparator : string
Return values
$thissetExchangeRate()
public
setExchangeRate(float $exchangeRate) : $this
Parameters
- $exchangeRate : float
Return values
$thissetId()
public
setId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thissetInternal()
public
setInternal(bool $internal) : $this
Parameters
- $internal : bool
Return values
$thissetKey()
public
setKey(string $key) : $this
Parameters
- $key : string
Return values
$thissetMonetary()
public
setMonetary(bool $monetary) : $this
Parameters
- $monetary : bool
Return values
$thissetName()
public
setName(string $name) : $this
Parameters
- $name : string
Return values
$thissetNegativeSymbolPosition()
public
setNegativeSymbolPosition(string $negativeSymbolPosition) : $this
Parameters
- $negativeSymbolPosition : string
Return values
$thissetNoInvoicing()
public
setNoInvoicing(bool $noInvoicing) : $this
Parameters
- $noInvoicing : bool
Return values
$thissetOrderRoundingWhole()
public
setOrderRoundingWhole(bool $orderRoundingWhole) : $this
Parameters
- $orderRoundingWhole : bool
Return values
$thissetPrecision()
public
setPrecision(int $precision) : $this
Parameters
- $precision : int
Return values
$thissetSeparator()
public
setSeparator(string $separator) : $this
Parameters
- $separator : string
Return values
$thissetShortcut()
public
setShortcut(string $shortcut) : $this
Parameters
- $shortcut : string
Return values
$thissetShowSuffix()
public
setShowSuffix(bool $showSuffix) : $this
Parameters
- $showSuffix : bool
Return values
$thissetSuffix()
public
setSuffix(string $suffix) : $this
Parameters
- $suffix : string
Return values
$thissetTranslations()
public
setTranslations(Collection<int, TTranslation>|array<int, TTranslation> $translations) : $this
Parameters
- $translations : Collection<int, TTranslation>|array<int, TTranslation>
Return values
$thistranslationCollectionInit()
public
translationCollectionInit() : void
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>