InvoiceGift
extends InvoiceGift
in package
Attributes
- #[Entity]
- #[Table]
- $name: 'cms_mod_invoicer_invoice_gifts'
- #[TableAlias]
- 'invoiceGift'
Table of Contents
Properties
- $code : string|null
- $id : int|null
- $invoice : Invoice|null
- $invoiceId : int|null
- $name : string
- $quantity : int
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.
- getCode() : string|null
- getId() : int|null
- getInvoice() : Invoice|null
- getInvoiceId() : int|null
- getName() : string
- getQuantity() : int
- isPersisted() : bool
- setCode() : $this
- setId() : $this
- setInvoice() : self
- setInvoiceId() : $this
- setName() : $this
- setQuantity() : $this
- getTraitsRecursive() : array<string, string>
- Walks the trait list recursively and collects nested traits too.
Properties
$code
protected
string|null
$code
= null
Attributes
- #[Column]
- $name: 'code'
- $type: 'string'
- $length: 255
- $nullable: true
$id
protected
int|null
$id
= null
Attributes
- #[Column]
- $name: 'invoice_gift_id'
- $type: 'integer'
- $options: ['unsigned' => true]
- #[GeneratedValue]
- #[Id]
$invoice
protected
Invoice|null
$invoice
= null
Attributes
- #[JoinColumn]
- $name: 'cms_mod_invoicer_invoices_invoice_id'
- $referencedColumnName: 'invoice_id'
- $onDelete: 'CASCADE'
- #[ManyToOne]
- $targetEntity: \App\UI\Api\Invoicer\Models\Entities\Invoice::class
- $inversedBy: 'gifts'
$invoiceId
protected
int|null
$invoiceId
= null
Attributes
- #[Column]
- $name: 'cms_mod_invoicer_invoices_invoice_id'
- $type: 'integer'
- $insertable: false
- $updatable: false
- $nullable: true
- $options: ['unsigned' => true]
$name
protected
string
$name
= ''
Attributes
- #[Column]
- $name: 'name'
- $type: 'string'
- $length: 255
$quantity
protected
int
$quantity
= 1
Attributes
- #[Column]
- $name: 'quantity'
- $type: 'integer'
Methods
__construct()
public
__construct([int|null $id = null ][, int|null $invoiceId = null ][, string|null $code = null ][, string $name = '' ][, int $quantity = 1 ]) : mixed
Parameters
- $id : int|null = null
- $invoiceId : int|null = null
- $code : string|null = null
- $name : string = ''
- $quantity : int = 1
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>getCode()
public
getCode() : string|null
Return values
string|nullgetId()
public
getId() : int|null
Return values
int|nullgetInvoice()
public
getInvoice() : Invoice|null
Return values
Invoice|nullgetInvoiceId()
public
getInvoiceId() : int|null
Return values
int|nullgetName()
public
getName() : string
Return values
stringgetQuantity()
public
getQuantity() : int
Return values
intisPersisted()
public
isPersisted() : bool
Return values
boolsetCode()
public
setCode(string|null $code) : $this
Parameters
- $code : string|null
Return values
$thissetId()
public
setId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thissetInvoice()
public
setInvoice(Invoice|null $invoice) : self
Parameters
- $invoice : Invoice|null
Return values
selfsetInvoiceId()
public
setInvoiceId(int|null $invoiceId) : $this
Parameters
- $invoiceId : int|null
Return values
$thissetName()
public
setName(string $name) : $this
Parameters
- $name : string
Return values
$thissetQuantity()
public
setQuantity(int $quantity) : $this
Parameters
- $quantity : int
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>