KMP PHP API Reference

WorkflowVersion extends BaseEntity
in package

WorkflowVersion Entity

Immutable versioned snapshot of a workflow design. Each version contains the full workflow graph and optional visual canvas layout.

Table of Contents

Constants

STATUS_ARCHIVED  : mixed = 'archived'
STATUS_DRAFT  : mixed = 'draft'
STATUS_PUBLISHED  : mixed = 'published'

Properties

$branch_id  : int|null
$canvas_layout  : array<string|int, mixed>|null
$change_notes  : string|null
$created  : DateTime|null
$created_by  : int|null
$definition  : array<string|int, mixed>
$id  : int
$modified  : DateTime|null
$published_at  : DateTime|null
$published_by  : int|null
$status  : string
$version_number  : int
$workflow_definition  : WorkflowDefinition
$workflow_definition_id  : int
$_accessible  : array<string, bool>
Fields that can be mass assigned.

Methods

getBranchId()  : int|null
Get the branch ID for authorization checks.
isDraft()  : bool
Check if this version is a draft.
isPublished()  : bool
Check if this version is published.

Constants

Properties

$branch_id

public int|null $branch_id

Associated branch ID (when applicable)

$_accessible

Fields that can be mass assigned.

protected array<string, bool> $_accessible = ['workflow_definition_id' => true, 'version_number' => true, 'definition' => true, 'canvas_layout' => true, 'status' => true, 'published_at' => true, 'published_by' => true, 'change_notes' => true, 'created_by' => true]

Methods

getBranchId()

Get the branch ID for authorization checks.

public getBranchId() : int|null

Child classes should override for complex branch relationships.

Return values
int|null

The branch ID, or null if no association

isDraft()

Check if this version is a draft.

public isDraft() : bool
Return values
bool

isPublished()

Check if this version is published.

public isPublished() : bool
Return values
bool
On this page

Search results