CoolCMS API

PaymentRegion extends PaymentRegion
in package

Tags
extends
Attributes
#[Entity]
#[Table]
$name: 'cms_system_payment_regions'
#[TableAlias]
'paymentRegion'

Table of Contents

Properties

$active  : bool
$countryCode  : string|null
$currency  : Currency
$currencyId  : int|null
$id  : int|null
$isCountry  : bool
$isDefault  : bool
$languageId  : int|null
$regionId  : int|null
$translations  : Collection

Methods

__construct()  : mixed
addTranslation()  : $this
callInitMethods()  : void
Calls `init{TraitName}()` for every used trait that defines such a method.
getActive()  : bool
getAllTraits()  : array<string, string>
Returns all traits the class uses, including those used by parent classes and nested traits.
getCountryCode()  : string|null
ISO 3166-1 alpha-2 code of the region's country (`null` = no country).
getCurrency()  : Currency|null
getCurrencyId()  : int|null
getId()  : int|null
getIsCountry()  : bool
getIsDefault()  : bool
getLanguageId()  : int|null
Default language of the region invoices (`null` falls back to `7/invoice.default.languageId`).
getRegionId()  : int|null
getTranslation()  : TTranslation|null
getTranslations()  : Collection<int, TTranslation>
isActive()  : bool
isCountry()  : bool
isDefault()  : bool
isPersisted()  : bool
removeTranslation()  : $this
setActive()  : $this
setCountryCode()  : TCurrency>
setCurrency()  : $this
setCurrencyId()  : $this
setId()  : $this
setIsCountry()  : $this
setIsDefault()  : $this
setLanguageId()  : TCurrency>
setRegionId()  : $this
setTranslations()  : $this
translationCollectionInit()  : void
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$active

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

$countryCode

protected string|null $countryCode = null
Attributes
#[Column]
$name: 'country_code'
$type: 'string'
$length: 2
$nullable: true
$options: ['fixed' => true]

$currency

protected Currency $currency = null
Attributes
#[JoinColumn]
$name: 'cms_system_currencies_currency_id'
$referencedColumnName: 'currency_id'
$onDelete: 'SET NULL'
#[ManyToOne]
$targetEntity: \App\UI\Api\System\Models\Entities\Currency::class
$fetch: "LAZY"

$currencyId

protected int|null $currencyId = null
Attributes
#[Column]
$name: 'cms_system_currencies_currency_id'
$type: 'integer'
$nullable: true
$options: ['unsigned' => true]

$id

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

$isCountry

protected bool $isCountry = true
Attributes
#[Column]
$name: 'is_country'
$type: 'boolean'

$isDefault

protected bool $isDefault = false
Attributes
#[Column]
$name: 'is_default'
$type: 'boolean'

$languageId

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

$regionId

protected int|null $regionId = null
Attributes
#[Column]
$name: 'cms_system_regions_region_id'
$type: 'integer'
$nullable: true
$options: ['unsigned' => true]

$translations

protected Collection $translations
Attributes
#[OneToMany]
$targetEntity: \App\UI\Api\System\Models\Entities\PaymentRegionText::class
$mappedBy: 'parent'
$cascade: ["persist", "remove"]
$orphanRemoval: true
$fetch: "LAZY"

Methods

__construct()

public __construct([int|null $id = null ][, int|null $currencyId = null ][, int|null $languageId = null ][, bool $isCountry = true ][, bool $isDefault = false ][, int|null $regionId = null ][, string|null $countryCode = null ][, bool $active = true ][, mixed $currency = null ][, Collection $translations = new ArrayCollection() ]) : mixed
Parameters
$id : int|null = null
$currencyId : int|null = null
$languageId : int|null = null
$isCountry : bool = true
$isDefault : bool = false
$regionId : int|null = null
$countryCode : string|null = null
$active : bool = true
$currency : mixed = null
$translations : Collection = new ArrayCollection()

addTranslation()

public addTranslation(TTranslation $translation) : $this
Parameters
$translation : TTranslation
Return values
$this

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>

getCountryCode()

ISO 3166-1 alpha-2 code of the region's country (`null` = no country).

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

getCurrencyId()

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

getIsCountry()

public getIsCountry() : bool
Return values
bool

getIsDefault()

public getIsDefault() : bool
Return values
bool

getLanguageId()

Default language of the region invoices (`null` falls back to `7/invoice.default.languageId`).

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

getRegionId()

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

getTranslation()

public getTranslation(int $langId) : TTranslation|null
Parameters
$langId : int
Return values
TTranslation|null

getTranslations()

public getTranslations() : Collection<int, TTranslation>
Return values
Collection<int, TTranslation>

removeTranslation()

public removeTranslation(TTranslation $translation) : $this
Parameters
$translation : TTranslation
Return values
$this

setActive()

public setActive(bool $active) : $this
Parameters
$active : bool
Return values
$this

setCountryCode()

public setCountryCode(string|null $countryCode) : TCurrency>
Parameters
$countryCode : string|null
Return values
TCurrency>

setCurrency()

public setCurrency(TCurrency|null $currency) : $this
Parameters
$currency : TCurrency|null
Return values
$this

setCurrencyId()

public setCurrencyId(int|null $currencyId) : $this
Parameters
$currencyId : int|null
Return values
$this

setId()

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

setIsCountry()

public setIsCountry(bool $isCountry) : $this
Parameters
$isCountry : bool
Return values
$this

setIsDefault()

public setIsDefault(bool $isDefault) : $this
Parameters
$isDefault : bool
Return values
$this

setLanguageId()

public setLanguageId(int|null $languageId) : TCurrency>
Parameters
$languageId : int|null
Return values
TCurrency>

setRegionId()

public setRegionId(int|null $regionId) : $this
Parameters
$regionId : int|null
Return values
$this

setTranslations()

public setTranslations(Collection<int, TTranslation>|array<int, TTranslation> $translations) : $this
Parameters
$translations : Collection<int, TTranslation>|array<int, TTranslation>
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