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).
invoiceTypeIdmaps to the Invoicer types by identity (keysORDER,INVOICE,PROFORMA,STORNOmatch in id and meaning); a plain int without FK, because Invoicer is a foreign module.confirmStockis set on theSENTstatus, not onDONE: the Store issue document is confirmed (confirm()) on dispatch.
Tags
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
$thiscallInitMethods()
Calls `init{TraitName}()` for every used trait that defines such a method.
public
callInitMethods() : void
getAllowCancelling()
public
getAllowCancelling() : 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>getCancelOrder()
public
getCancelOrder() : bool
Return values
boolgetClass()
public
getClass() : string|null
Return values
string|nullgetConfirmStock()
public
getConfirmStock() : bool
Return values
boolgetCreateInvoice()
public
getCreateInvoice() : bool
Return values
boolgetCreateOrder()
public
getCreateOrder() : bool
Return values
boolgetFillExpedition()
public
getFillExpedition() : bool
Return values
boolgetGenerateVoucher()
public
getGenerateVoucher() : bool
Return values
boolgetId()
public
getId() : int|null
Return values
int|nullgetInvoiceTypeId()
public
getInvoiceTypeId() : int|null
Return values
int|nullgetKey()
public
getKey() : string|null
Return values
string|nullgetPairPayment()
public
getPairPayment() : bool
Return values
boolgetSendDefaultEmail()
public
getSendDefaultEmail() : bool
Return values
boolgetSendEmail()
public
getSendEmail() : bool
Return values
boolgetTranslation()
public
getTranslation(int $langId) : TTranslation|null
Parameters
- $langId : int
Return values
TTranslation|nullgetTranslations()
public
getTranslations() : Collection<int, TTranslation>
Return values
Collection<int, TTranslation>getUpdateUserPoints()
public
getUpdateUserPoints() : bool
Return values
boolisPersisted()
public
isPersisted() : bool
Return values
boolremoveTranslation()
public
removeTranslation(TTranslation $translation) : $this
Parameters
- $translation : TTranslation
Return values
$thissetAllowCancelling()
public
setAllowCancelling(bool $allowCancelling) : $this
Parameters
- $allowCancelling : bool
Return values
$thissetCancelOrder()
public
setCancelOrder(bool $cancelOrder) : $this
Parameters
- $cancelOrder : bool
Return values
$thissetClass()
public
setClass(string|null $class) : $this
Parameters
- $class : string|null
Return values
$thissetConfirmStock()
public
setConfirmStock(bool $confirmStock) : $this
Parameters
- $confirmStock : bool
Return values
$thissetCreateInvoice()
public
setCreateInvoice(bool $createInvoice) : $this
Parameters
- $createInvoice : bool
Return values
$thissetCreateOrder()
public
setCreateOrder(bool $createOrder) : $this
Parameters
- $createOrder : bool
Return values
$thissetFillExpedition()
public
setFillExpedition(bool $fillExpedition) : $this
Parameters
- $fillExpedition : bool
Return values
$thissetGenerateVoucher()
public
setGenerateVoucher(bool $generateVoucher) : $this
Parameters
- $generateVoucher : bool
Return values
$thissetId()
public
setId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thissetInvoiceTypeId()
public
setInvoiceTypeId(int|null $invoiceTypeId) : $this
Parameters
- $invoiceTypeId : int|null
Return values
$thissetKey()
public
setKey(string|null $key) : $this
Parameters
- $key : string|null
Return values
$thissetPairPayment()
public
setPairPayment(bool $pairPayment) : $this
Parameters
- $pairPayment : bool
Return values
$thissetSendDefaultEmail()
public
setSendDefaultEmail(bool $sendDefaultEmail) : $this
Parameters
- $sendDefaultEmail : bool
Return values
$thissetSendEmail()
public
setSendEmail(bool $sendEmail) : $this
Parameters
- $sendEmail : bool
Return values
$thissetTranslations()
public
setTranslations(Collection<int, TTranslation>|array<int, TTranslation> $translations) : $this
Parameters
- $translations : Collection<int, TTranslation>|array<int, TTranslation>
Return values
$thissetUpdateUserPoints()
public
setUpdateUserPoints(bool $updateUserPoints) : $this
Parameters
- $updateUserPoints : bool
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>