CoolCMS API

WorkSheet extends BaseEntity
in package
implements IdentifiableInterface uses IdentifiableTrait

AbstractYes

Work sheet: a billing batch inside a job (`WorkList`).

A job has many sheets; invoicing runs over the selected sheets (bill = 1), not over the whole job. There is no work item collection: items are read through WorkItemManager with the workSheetId filter, not through an inline collection (same as WorkList).

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

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

$bill  : bool
$closedDatetime  : DateTime|null
$deleted  : bool
$id  : int|null
$insertDatetime  : DateTime
$invoicerInvoiceId  : int|null
$name  : string
$order  : int
$state  : WorkSheetState
$stateBeforeClosing  : WorkSheetState|null
$updateDatetime  : DateTime|null
$workListId  : 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.
getBill()  : bool
getClosedDatetime()  : DateTime|null
getDeleted()  : bool
getId()  : int|null
getInsertDatetime()  : DateTime
getInvoicerInvoiceId()  : int|null
getName()  : string
getOrder()  : int
getState()  : WorkSheetState
getStateBeforeClosing()  : WorkSheetState|null
getUpdateDatetime()  : DateTime|null
getWorkListId()  : int
isBill()  : bool
isDeleted()  : bool
isPersisted()  : bool
setBill()  : $this
setClosedDatetime()  : $this
setDeleted()  : $this
setId()  : $this
setInsertDatetime()  : $this
setInvoicerInvoiceId()  : $this
setName()  : $this
setOrder()  : $this
setState()  : $this
setStateBeforeClosing()  : $this
setUpdateDatetime()  : $this
setWorkListId()  : $this
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$closedDatetime

protected DateTime|null $closedDatetime = null
Attributes
#[Column]
$name: 'closed_datetime'
$type: 'datetime'
$nullable: true
#[ExternalReadonly]

$id

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

$insertDatetime

protected DateTime $insertDatetime = new DateTime()
Attributes
#[Column]
$name: 'insert_datetime'
$type: 'datetime'
#[ExternalReadonly]

$invoicerInvoiceId

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

$name

protected string $name = ''
Attributes
#[Column]
$name: 'name'
$type: 'string'
$length: 255

$order

protected int $order = 0
Attributes
#[Column]
$name: '`order`'
$type: 'integer'
$options: ['unsigned' => true, 'default' => 0]

$stateBeforeClosing

protected WorkSheetState|null $stateBeforeClosing = null
Attributes
#[Column]
$name: 'state_before_closing'
$type: 'string'
$length: 16
$enumType: WorkSheetState::class
$nullable: true
#[ExternalReadonly]

$updateDatetime

protected DateTime|null $updateDatetime = null
Attributes
#[Column]
$name: 'update_datetime'
$type: 'datetime'
$nullable: true
#[ExternalReadonly]

$workListId

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

Methods

__construct()

public __construct([int|null $id = null ][, int $workListId = 0 ][, string $name = '' ][, WorkSheetState $state = WorkSheetState::Open ][, WorkSheetState|null $stateBeforeClosing = null ][, bool $bill = false ][, int $order = 0 ][, DateTime|null $closedDatetime = null ][, int|null $invoicerInvoiceId = null ][, DateTime $insertDatetime = new DateTime() ][, DateTime|null $updateDatetime = null ][, bool $deleted = false ]) : mixed
Parameters
$id : int|null = null
$workListId : int = 0
$name : string = ''
$state : WorkSheetState = WorkSheetState::Open
$stateBeforeClosing : WorkSheetState|null = null
$bill : bool = false
$order : int = 0
$closedDatetime : DateTime|null = null
$invoicerInvoiceId : int|null = null
$insertDatetime : DateTime = new DateTime()
$updateDatetime : DateTime|null = null
$deleted : bool = false

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>

getBill()

public getBill() : bool
Return values
bool

getClosedDatetime()

public getClosedDatetime() : DateTime|null
Return values
DateTime|null

getDeleted()

public getDeleted() : bool
Return values
bool

getInsertDatetime()

public getInsertDatetime() : DateTime
Return values
DateTime

getInvoicerInvoiceId()

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

getName()

public getName() : string
Return values
string

getOrder()

public getOrder() : int
Return values
int

getUpdateDatetime()

public getUpdateDatetime() : DateTime|null
Return values
DateTime|null

getWorkListId()

public getWorkListId() : int
Return values
int

isBill()

public isBill() : bool
Return values
bool

isDeleted()

public isDeleted() : bool
Return values
bool

setBill()

public setBill(bool $bill) : $this
Parameters
$bill : bool
Return values
$this

setClosedDatetime()

public setClosedDatetime(DateTime|null $closedDatetime) : $this
Parameters
$closedDatetime : DateTime|null
Return values
$this

setDeleted()

public setDeleted(bool $deleted) : $this
Parameters
$deleted : bool
Return values
$this

setId()

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

setInsertDatetime()

public setInsertDatetime(DateTime $insertDatetime) : $this
Parameters
$insertDatetime : DateTime
Return values
$this

setInvoicerInvoiceId()

public setInvoicerInvoiceId(int|null $invoicerInvoiceId) : $this
Parameters
$invoicerInvoiceId : int|null
Return values
$this

setName()

public setName(string $name) : $this
Parameters
$name : string
Return values
$this

setOrder()

public setOrder(int $order) : $this
Parameters
$order : int
Return values
$this

setUpdateDatetime()

public setUpdateDatetime(DateTime|null $updateDatetime) : $this
Parameters
$updateDatetime : DateTime|null
Return values
$this

setWorkListId()

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