PaymentRegion
extends BaseEntity
in package
implements
IdentifiableInterface
uses
IdentifiableTrait, TranslationCollectionTrait
AbstractYes
Tags
Attributes
- #[MappedSuperclass]
- #[TableAlias]
- $alias: 'paymentRegion'
Table of Contents
Interfaces
- IdentifiableInterface
- Entity with a simple integer primary key. Most entities have one (often via {@see \App\Core\Traits\Shared\Models\Entities\IdentifiableTrait}); texts and links with a composite key do not, which is why `getId()` is not on {@see \App\Core\Base\BaseEntity}. Code that needs the id of a generic entity asks for this interface (parameter type, template bound, `instanceof`).
Properties
- $active : bool
- $countryCode : string|null
- $currency : TCurrency|null
- $currencyId : int|null
- $id : int|null
- $isCountry : bool
- $isDefault : bool
- $languageId : int|null
- $regionId : int|null
- $translations : Collection<int, TTranslation>
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
TCurrency|null
$currency
= null
Attributes
- #[JoinColumn]
- $name: 'cms_system_currencies_currency_id'
- $referencedColumnName: 'currency_id'
- $onDelete: 'SET NULL'
$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<int, TTranslation>
$translations
= new ArrayCollection()
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
$thiscallInitMethods()
Calls `init{TraitName}()` for every used trait that defines such a method.
public
callInitMethods() : void
getActive()
public
getActive() : bool
Return values
boolgetAllTraits()
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|nullgetCurrency()
public
getCurrency() : Currency|null
Return values
Currency|nullgetCurrencyId()
public
getCurrencyId() : int|null
Return values
int|nullgetId()
public
getId() : int|null
Return values
int|nullgetIsCountry()
public
getIsCountry() : bool
Return values
boolgetIsDefault()
public
getIsDefault() : bool
Return values
boolgetLanguageId()
Default language of the region invoices (`null` falls back to `7/invoice.default.languageId`).
public
getLanguageId() : int|null
Return values
int|nullgetRegionId()
public
getRegionId() : int|null
Return values
int|nullgetTranslation()
public
getTranslation(int $langId) : TTranslation|null
Parameters
- $langId : int
Return values
TTranslation|nullgetTranslations()
public
getTranslations() : Collection<int, TTranslation>
Return values
Collection<int, TTranslation>isActive()
public
isActive() : bool
Return values
boolisCountry()
public
isCountry() : bool
Return values
boolisDefault()
public
isDefault() : bool
Return values
boolisPersisted()
public
isPersisted() : bool
Return values
boolremoveTranslation()
public
removeTranslation(TTranslation $translation) : $this
Parameters
- $translation : TTranslation
Return values
$thissetActive()
public
setActive(bool $active) : $this
Parameters
- $active : bool
Return values
$thissetCountryCode()
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
$thissetCurrencyId()
public
setCurrencyId(int|null $currencyId) : $this
Parameters
- $currencyId : int|null
Return values
$thissetId()
public
setId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thissetIsCountry()
public
setIsCountry(bool $isCountry) : $this
Parameters
- $isCountry : bool
Return values
$thissetIsDefault()
public
setIsDefault(bool $isDefault) : $this
Parameters
- $isDefault : bool
Return values
$thissetLanguageId()
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
$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>