KMP PHP API Reference

WorkflowApproval extends BaseEntity
in package

WorkflowApproval Entity

Approval gate within a running workflow instance. Tracks required/received approval counts, deadline, and escalation configuration.

Table of Contents

Constants

APPROVER_TYPE_DYNAMIC  : mixed = 'dynamic'
APPROVER_TYPE_MEMBER  : mixed = 'member'
APPROVER_TYPE_PERMISSION  : mixed = 'permission'
APPROVER_TYPE_POLICY  : mixed = 'policy'
APPROVER_TYPE_ROLE  : mixed = 'role'
STATUS_APPROVED  : mixed = 'approved'
STATUS_CANCELLED  : mixed = 'cancelled'
STATUS_EXPIRED  : mixed = 'expired'
STATUS_PENDING  : mixed = 'pending'
STATUS_REJECTED  : mixed = 'rejected'

Properties

$allow_parallel  : bool
$approval_token  : string|null
$approved_count  : int
$approver_config  : array<string|int, mixed>|null
$approver_lookup_branch_id  : int|null
$approver_lookup_branch_mode  : string|null
$approver_lookup_branch_type  : string|null
$approver_lookup_context_id  : int|null
$approver_lookup_id  : int|null
$approver_lookup_name  : string|null
$approver_lookup_type  : string|null
$approver_type  : string
$branch_id  : int|null
$created  : DateTime|null
$current_approver_id  : int|null
$deadline  : DateTime|null
$escalation_config  : array<string|int, mixed>|null
$execution_log_id  : int
$id  : int
$modified  : DateTime|null
$node_id  : string
$rejected_count  : int
$request_title  : string|null
$requester_member  : Member|null
$requester_member_id  : int|null
$required_count  : int
$status  : string
$version  : int
$workflow_approval_responses  : array<string|int, WorkflowApprovalResponse>
$workflow_approval_triage_states  : array<string|int, WorkflowApprovalTriageState>
$workflow_execution_log  : WorkflowExecutionLog
$workflow_instance  : WorkflowInstance
$workflow_instance_id  : int
$_accessible  : array<string, bool>
Fields that can be mass assigned.

Methods

getBranchId()  : int|null
Get the branch ID for authorization checks.
hasReachedThreshold()  : bool
Check if the approval threshold has been reached.
isPending()  : bool
Check if this approval gate is still pending.
isResolved()  : bool
Check if this approval gate has been resolved (approved, rejected, expired, or cancelled).

Constants

APPROVER_TYPE_PERMISSION

public mixed APPROVER_TYPE_PERMISSION = 'permission'

Properties

$approver_lookup_branch_mode

public string|null $approver_lookup_branch_mode

$approver_lookup_branch_type

public string|null $approver_lookup_branch_type

$branch_id

public int|null $branch_id

Associated branch ID (when applicable)

$escalation_config

public array<string|int, mixed>|null $escalation_config

$_accessible

Fields that can be mass assigned.

protected array<string, bool> $_accessible = ['workflow_instance_id' => true, 'node_id' => true, 'execution_log_id' => true, 'approver_type' => true, 'approver_config' => true, 'current_approver_id' => true, 'approver_lookup_type' => true, 'approver_lookup_id' => true, 'approver_lookup_name' => true, 'approver_lookup_branch_id' => true, 'approver_lookup_branch_mode' => true, 'approver_lookup_branch_type' => true, 'approver_lookup_context_id' => true, 'request_title' => true, 'requester_member_id' => true, 'required_count' => true, 'approved_count' => true, 'rejected_count' => true, 'status' => true, 'allow_parallel' => true, 'deadline' => true, 'escalation_config' => true, 'version' => true, 'approval_token' => true, 'workflow_approval_triage_states' => 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

hasReachedThreshold()

Check if the approval threshold has been reached.

public hasReachedThreshold() : bool
Return values
bool

isPending()

Check if this approval gate is still pending.

public isPending() : bool
Return values
bool

isResolved()

Check if this approval gate has been resolved (approved, rejected, expired, or cancelled).

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

Search results