KMP PHP API Reference

RecommendationWorkflowUiService
in package
uses LocatorAwareTrait

Builds recommendation approval workflow context for recommendation screens.

Table of Contents

Properties

$lifecycle  : RecommendationApprovalWorkflowLifecycleService

Methods

__construct()  : mixed
buildContext()  : array<string, mixed>
Build workflow display and action context for a recommendation.
canStartApprovalWorkflow()  : bool
Determine whether a new approval workflow can be started.
pendingApprovalForRecommendation()  : WorkflowApproval|null
Return the current user's pending approval for a recommendation, if any.
approvalsByProcessStepKey()  : array<string, WorkflowApproval>
Index workflow approvals by their Awards approval-process step key.
approvalStepLabel()  : string
Return a human-friendly label for an approval gate.
buildProcessStepSummary()  : array<string, mixed>
Build progress from Awards approval-process steps, including future steps not yet materialized.
buildRunSummary()  : array<string, mixed>
Build progress details for a specific approval run.
buildSummary()  : array<string, mixed>
Build high-level workflow progress for the current recommendation.
canStartWorkflow()  : bool
currentStepSequence()  : int|null
Find the configured sequence for the current approval process step.
formatApprovalResponses()  : array<int, array<string, string>>
Format approval responses for concise progress summaries.
formatRuns()  : array<int, array<string, mixed>>
loadRuns()  : array<int, RecommendationApprovalRun>
pendingApprovalForIdentity()  : WorkflowApproval|null

Properties

Methods

approvalsByProcessStepKey()

Index workflow approvals by their Awards approval-process step key.

private approvalsByProcessStepKey(array<int, mixed> $approvals) : array<string, WorkflowApproval>
Parameters
$approvals : array<int, mixed>

Materialized approvals.

Return values
array<string, WorkflowApproval>

buildProcessStepSummary()

Build progress from Awards approval-process steps, including future steps not yet materialized.

private buildProcessStepSummary(RecommendationApprovalRun $run, array<int, mixed> $approvals, array<int, mixed> $processSteps) : array<string, mixed>
Parameters
$run : RecommendationApprovalRun

Approval run.

$approvals : array<int, mixed>

Materialized workflow approvals.

$processSteps : array<int, mixed>

Configured approval-process steps.

Return values
array<string, mixed>

currentStepSequence()

Find the configured sequence for the current approval process step.

private currentStepSequence(array<int, mixed> $processSteps, string $currentStepKey) : int|null
Parameters
$processSteps : array<int, mixed>

Configured process steps.

$currentStepKey : string

Current step key.

Return values
int|null
On this page

Search results