PaymentItem
extends PaymentItem
in package
Accounting snapshot of payment items taken at checkout (name, base, VAT rate, product type as charged); the invoice lines are built from it (`InvoiceGenerator`).
NOTE: do not confuse it with the module cms_mod_*_payment_items and
cms_system_user_payment_items, which are activation items (what to switch on in the module
after payment). The live price list may change, the snapshot must not.
Attributes
- #[Entity]
- #[Table]
- $name: 'cms_system_payment_items'
- #[TableAlias]
- 'paymentItem'
Table of Contents
Properties
- $id : int|null
- $name : string
- $paymentId : int
- $price : string
- $productTypeId : int|null
- $sort : int
- $supplyKindId : int|null
- $vatPercents : numeric-string|null
Methods
- __construct() : mixed
- 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.
- getId() : int|null
- getName() : string
- getPaymentId() : int
- getPrice() : string
- getProductTypeId() : int|null
- getSort() : int
- getSupplyKindId() : int|null
- getVatPercents() : numeric-string|null
- isPersisted() : bool
- setId() : $this
- setName() : $this
- setPaymentId() : $this
- setPrice() : $this
- setProductTypeId() : $this
- setSort() : $this
- setSupplyKindId() : $this
- setVatPercents() : $this
- getTraitsRecursive() : array<string, string>
- Walks the trait list recursively and collects nested traits too.
Properties
$id
protected
int|null
$id
= null
Attributes
- #[Column]
- $name: 'payment_item_id'
- $type: 'integer'
- $options: ['unsigned' => true]
- #[GeneratedValue]
- #[Id]
$name
protected
string
$name
= ''
Attributes
- #[Column]
- $name: 'name'
- $type: 'string'
- $length: 255
$paymentId
protected
int
$paymentId
= 0
Attributes
- #[Column]
- $name: 'cms_system_payments_payment_id'
- $type: 'integer'
- $options: ['unsigned' => true]
$price
protected
string
$price
= '0.000'
Attributes
- #[Column]
- $name: 'price'
- $type: 'decimal'
- $precision: 10
- $scale: 3
$productTypeId
protected
int|null
$productTypeId
= null
Attributes
- #[Column]
- $name: 'cms_mod_invoicer_product_types_product_type_id'
- $type: 'integer'
- $nullable: true
- $options: ['unsigned' => true]
$sort
protected
int
$sort
= 0
Attributes
- #[Column]
- $name: 'sort'
- $type: 'integer'
- $options: ['unsigned' => true]
$supplyKindId
protected
int|null
$supplyKindId
= null
Attributes
- #[Column]
- $name: 'cms_system_supply_kinds_supply_kind_id'
- $type: 'integer'
- $nullable: true
- $options: ['unsigned' => true]
$vatPercents
protected
numeric-string|null
$vatPercents
= null
Attributes
- #[Column]
- $name: 'vat_percents'
- $type: 'decimal'
- $precision: 5
- $scale: 2
- $nullable: true
Methods
__construct()
public
__construct([int|null $id = null ][, int $paymentId = 0 ][, string $name = '' ][, string $price = '0.000' ][, string|null $vatPercents = null ][, int|null $productTypeId = null ][, int|null $supplyKindId = null ][, int $sort = 0 ]) : mixed
Parameters
- $id : int|null = null
- $paymentId : int = 0
- $name : string = ''
- $price : string = '0.000'
- $vatPercents : string|null = null
- $productTypeId : int|null = null
- $supplyKindId : int|null = null
- $sort : int = 0
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>getId()
public
getId() : int|null
Return values
int|nullgetName()
public
getName() : string
Return values
stringgetPaymentId()
public
getPaymentId() : int
Return values
intgetPrice()
public
getPrice() : string
Return values
stringgetProductTypeId()
public
getProductTypeId() : int|null
Return values
int|nullgetSort()
public
getSort() : int
Return values
intgetSupplyKindId()
public
getSupplyKindId() : int|null
Return values
int|nullgetVatPercents()
public
getVatPercents() : numeric-string|null
Return values
numeric-string|nullisPersisted()
public
isPersisted() : bool
Return values
boolsetId()
public
setId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thissetName()
public
setName(string $name) : $this
Parameters
- $name : string
Return values
$thissetPaymentId()
public
setPaymentId(int $paymentId) : $this
Parameters
- $paymentId : int
Return values
$thissetPrice()
public
setPrice(string $price) : $this
Parameters
- $price : string
Return values
$thissetProductTypeId()
public
setProductTypeId(int|null $productTypeId) : $this
Parameters
- $productTypeId : int|null
Return values
$thissetSort()
public
setSort(int $sort) : $this
Parameters
- $sort : int
Return values
$thissetSupplyKindId()
public
setSupplyKindId(int|null $supplyKindId) : $this
Parameters
- $supplyKindId : int|null
Return values
$thissetVatPercents()
public
setVatPercents(int|float|string|null $vatPercents) : $this
Parameters
- $vatPercents : int|float|string|null
Return values
$thisgetTraitsRecursive()
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>