CoolCMS API

PaymentStatusRule extends BaseEntity
in package
implements IdentifiableInterface uses IdentifiableTrait

AbstractYes

Maps a payment status to the invoice type generated automatically at that status.

One row = one multiselect item (M:N to the InvoiceType code list), not boolean columns per flag. Surrogate PK, because the entity is CRUDed on its own from the Setting form (the generic manager expects a scalar id); the (status, type) duplicate is guarded by a DB unique key. No Doctrine association to InvoiceType, only a link scalar, like other flat FKs in the module (e.g. Invoice::orderId).

Attributes
#[MappedSuperclass]
#[TableAlias]
$alias: 'paymentStatusRule'

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

$id  : int|null
$invoiceTypeId  : int
$paymentStatus  : 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.
getId()  : int|null
getInvoiceTypeId()  : int
getPaymentStatus()  : int
isPersisted()  : bool
setId()  : $this
setInvoiceTypeId()  : $this
setPaymentStatus()  : $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_status_rule_id'
$type: 'integer'
$options: ['unsigned' => true]
#[GeneratedValue]
#[Id]

$invoiceTypeId

protected int $invoiceTypeId = 0
Attributes
#[Column]
$name: 'cms_mod_invoicer_invoice_types_invoice_type_id'
$type: 'integer'
$options: ['unsigned' => true]

$paymentStatus

protected int $paymentStatus = 0
Attributes
#[Column]
$name: 'payment_status'
$type: 'integer'

Methods

__construct()

public __construct([int|null $id = null ][, int $paymentStatus = 0 ][, int $invoiceTypeId = 0 ]) : mixed
Parameters
$id : int|null = null
$paymentStatus : int = 0
$invoiceTypeId : 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>

setId()

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

setInvoiceTypeId()

public setInvoiceTypeId(int $invoiceTypeId) : $this
Parameters
$invoiceTypeId : int
Return values
$this

setPaymentStatus()

public setPaymentStatus(int $paymentStatus) : $this
Parameters
$paymentStatus : int
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