CoolCMS API

OrderStatus extends BaseEntity
in package
implements IdentifiableInterface uses IdentifiableTrait, TranslationCollectionTrait

AbstractYes

Order status: a node of the state graph. Behavioral flags tell `OrderTransitionManager` which effects a transition into this status triggers (the order of effects is defined there, this is configuration only).

  • invoiceTypeId maps to the Invoicer types by identity (keys ORDER, INVOICE, PROFORMA, STORNO match in id and meaning); a plain int without FK, because Invoicer is a foreign module.
  • confirmStock is set on the SENT status, not on DONE: the Store issue document is confirmed (confirm()) on dispatch.
Tags
template
Attributes
#[MappedSuperclass]
#[TableAlias]
$alias: 'orderStatus'

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

$allowCancelling  : bool
$cancelOrder  : bool
$class  : string|null
$confirmStock  : bool
$createInvoice  : bool
$createOrder  : bool
$fillExpedition  : bool
$generateVoucher  : bool
$id  : int|null
$invoiceTypeId  : int|null
$key  : string|null
$pairPayment  : bool
$sendDefaultEmail  : bool
$sendEmail  : bool
$translations  : Collection<int, TTranslation>
$updateUserPoints  : bool

Methods

__construct()  : mixed
addTranslation()  : $this
callInitMethods()  : void
Calls `init{TraitName}()` for every used trait that defines such a method.
getAllowCancelling()  : bool
getAllTraits()  : array<string, string>
Returns all traits the class uses, including those used by parent classes and nested traits.
getCancelOrder()  : bool
getClass()  : string|null
getConfirmStock()  : bool
getCreateInvoice()  : bool
getCreateOrder()  : bool
getFillExpedition()  : bool
getGenerateVoucher()  : bool
getId()  : int|null
getInvoiceTypeId()  : int|null
getKey()  : string|null
getPairPayment()  : bool
getSendDefaultEmail()  : bool
getSendEmail()  : bool
getTranslation()  : TTranslation|null
getTranslations()  : Collection<int, TTranslation>
getUpdateUserPoints()  : bool
isPersisted()  : bool
removeTranslation()  : $this
setAllowCancelling()  : $this
setCancelOrder()  : $this
setClass()  : $this
setConfirmStock()  : $this
setCreateInvoice()  : $this
setCreateOrder()  : $this
setFillExpedition()  : $this
setGenerateVoucher()  : $this
setId()  : $this
setInvoiceTypeId()  : $this
setKey()  : $this
setPairPayment()  : $this
setSendDefaultEmail()  : $this
setSendEmail()  : $this
setTranslations()  : $this
setUpdateUserPoints()  : $this
translationCollectionInit()  : void
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$allowCancelling

protected bool $allowCancelling = false
Attributes
#[Column]
$name: 'allow_cancelling'
$type: 'boolean'

$cancelOrder

protected bool $cancelOrder = false
Attributes
#[Column]
$name: 'cancel_order'
$type: 'boolean'

$class

protected string|null $class = null
Attributes
#[Column]
$name: 'class'
$type: 'string'
$length: 45
$nullable: true

$confirmStock

protected bool $confirmStock = false
Attributes
#[Column]
$name: 'confirm_stock'
$type: 'boolean'

$createInvoice

protected bool $createInvoice = false
Attributes
#[Column]
$name: 'create_invoice'
$type: 'boolean'

$createOrder

protected bool $createOrder = false
Attributes
#[Column]
$name: 'create_order'
$type: 'boolean'

$fillExpedition

protected bool $fillExpedition = false
Attributes
#[Column]
$name: 'fill_expedition'
$type: 'boolean'

$generateVoucher

protected bool $generateVoucher = false
Attributes
#[Column]
$name: 'generate_voucher'
$type: 'boolean'

$id

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

$invoiceTypeId

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

$key

protected string|null $key = null
Attributes
#[Column]
$name: '`key`'
$type: 'string'
$length: 30
$nullable: true

$pairPayment

protected bool $pairPayment = false
Attributes
#[Column]
$name: 'pair_payment'
$type: 'boolean'

$sendDefaultEmail

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

$sendEmail

protected bool $sendEmail = false
Attributes
#[Column]
$name: 'send_email'
$type: 'boolean'

$translations

protected Collection<int, TTranslation> $translations = new ArrayCollection()

$updateUserPoints

protected bool $updateUserPoints = false
Attributes
#[Column]
$name: 'update_user_points'
$type: 'boolean'

Methods

__construct()

public __construct([int|null $id = null ][, string|null $key = null ][, string|null $class = null ][, bool $createInvoice = false ][, int|null $invoiceTypeId = null ][, bool $pairPayment = false ][, bool $fillExpedition = false ][, bool $confirmStock = false ][, bool $generateVoucher = false ][, bool $sendEmail = false ][, bool $sendDefaultEmail = true ][, bool $updateUserPoints = false ][, bool $cancelOrder = false ][, bool $allowCancelling = false ][, bool $createOrder = false ][, Collection $translations = new ArrayCollection() ]) : mixed
Parameters
$id : int|null = null
$key : string|null = null
$class : string|null = null
$createInvoice : bool = false
$invoiceTypeId : int|null = null
$pairPayment : bool = false
$fillExpedition : bool = false
$confirmStock : bool = false
$generateVoucher : bool = false
$sendEmail : bool = false
$sendDefaultEmail : bool = true
$updateUserPoints : bool = false
$cancelOrder : bool = false
$allowCancelling : bool = false
$createOrder : bool = false
$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

getAllowCancelling()

public getAllowCancelling() : bool
Return values
bool

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>

getCancelOrder()

public getCancelOrder() : bool
Return values
bool

getClass()

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

getConfirmStock()

public getConfirmStock() : bool
Return values
bool

getCreateInvoice()

public getCreateInvoice() : bool
Return values
bool

getCreateOrder()

public getCreateOrder() : bool
Return values
bool

getFillExpedition()

public getFillExpedition() : bool
Return values
bool

getGenerateVoucher()

public getGenerateVoucher() : bool
Return values
bool

getInvoiceTypeId()

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

getKey()

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

getPairPayment()

public getPairPayment() : bool
Return values
bool

getSendDefaultEmail()

public getSendDefaultEmail() : bool
Return values
bool

getSendEmail()

public getSendEmail() : bool
Return values
bool

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>

getUpdateUserPoints()

public getUpdateUserPoints() : bool
Return values
bool

removeTranslation()

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

setAllowCancelling()

public setAllowCancelling(bool $allowCancelling) : $this
Parameters
$allowCancelling : bool
Return values
$this

setCancelOrder()

public setCancelOrder(bool $cancelOrder) : $this
Parameters
$cancelOrder : bool
Return values
$this

setClass()

public setClass(string|null $class) : $this
Parameters
$class : string|null
Return values
$this

setConfirmStock()

public setConfirmStock(bool $confirmStock) : $this
Parameters
$confirmStock : bool
Return values
$this

setCreateInvoice()

public setCreateInvoice(bool $createInvoice) : $this
Parameters
$createInvoice : bool
Return values
$this

setCreateOrder()

public setCreateOrder(bool $createOrder) : $this
Parameters
$createOrder : bool
Return values
$this

setFillExpedition()

public setFillExpedition(bool $fillExpedition) : $this
Parameters
$fillExpedition : bool
Return values
$this

setGenerateVoucher()

public setGenerateVoucher(bool $generateVoucher) : $this
Parameters
$generateVoucher : bool
Return values
$this

setId()

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

setInvoiceTypeId()

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

setKey()

public setKey(string|null $key) : $this
Parameters
$key : string|null
Return values
$this

setPairPayment()

public setPairPayment(bool $pairPayment) : $this
Parameters
$pairPayment : bool
Return values
$this

setSendDefaultEmail()

public setSendDefaultEmail(bool $sendDefaultEmail) : $this
Parameters
$sendDefaultEmail : bool
Return values
$this

setSendEmail()

public setSendEmail(bool $sendEmail) : $this
Parameters
$sendEmail : bool
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

setUpdateUserPoints()

public setUpdateUserPoints(bool $updateUserPoints) : $this
Parameters
$updateUserPoints : bool
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