RecommendationApprovalDecisionService
in package
Table of Contents
Constants
- BESTOWAL_GATHERING_WORKFLOW_SLUGS : mixed = ['awards-recommendation-submitted', 'awards-exi...
Properties
- $approvalManager : WorkflowApprovalManagerInterface
- $approvalProcessService : RecommendationApprovalProcessService
- $workflowEngine : WorkflowEngineInterface
Methods
- __construct() : mixed
- decide() : ServiceResult
- Record a recommendation approval decision and drive follow-up workflow work.
- validateApprovalDecision() : string|null
- Static validation helper for controller paths that have not built service dependencies yet.
- validateDecision() : string|null
- Validate a submitted approval decision.
- requiresFinalStepGathering() : bool
- Return whether this gate owns the required gathering selection for the final approval step.
Constants
BESTOWAL_GATHERING_WORKFLOW_SLUGS
private
mixed
BESTOWAL_GATHERING_WORKFLOW_SLUGS
= ['awards-recommendation-submitted', 'awards-existing-recommendation-approval']
Properties
$approvalManager
private
WorkflowApprovalManagerInterface
$approvalManager
$approvalProcessService
private
RecommendationApprovalProcessService
$approvalProcessService
$workflowEngine
private
WorkflowEngineInterface
$workflowEngine
Methods
__construct()
public
__construct(WorkflowApprovalManagerInterface $approvalManager, WorkflowEngineInterface $workflowEngine[, RecommendationApprovalProcessService|null $approvalProcessService = null ]) : mixed
Parameters
- $approvalManager : WorkflowApprovalManagerInterface
-
Approval manager
- $workflowEngine : WorkflowEngineInterface
-
Workflow engine
- $approvalProcessService : RecommendationApprovalProcessService|null = null
-
Process state reader
decide()
Record a recommendation approval decision and drive follow-up workflow work.
public
decide(WorkflowApproval $approval, int $memberId, string $decision, string|null $comment[, int|null $bestowalGatheringId = null ]) : ServiceResult
Parameters
- $approval : WorkflowApproval
-
Approval entity
- $memberId : int
-
Responding member ID
- $decision : string
-
Decision value
- $comment : string|null
-
Optional comment
- $bestowalGatheringId : int|null = null
-
Optional gathering selected by the final approval step
Return values
ServiceResultvalidateApprovalDecision()
Static validation helper for controller paths that have not built service dependencies yet.
public
static validateApprovalDecision(WorkflowApproval $approval, string $decision, string $comment) : string|null
Parameters
- $approval : WorkflowApproval
-
Approval entity
- $decision : string
-
Submitted decision
- $comment : string
-
Submitted comment text
Return values
string|null —Validation message
validateDecision()
Validate a submitted approval decision.
public
validateDecision(WorkflowApproval $approval, string $decision, string $comment) : string|null
Parameters
- $approval : WorkflowApproval
-
Approval entity
- $decision : string
-
Submitted decision
- $comment : string
-
Submitted comment text
Return values
string|null —Validation message
requiresFinalStepGathering()
Return whether this gate owns the required gathering selection for the final approval step.
private
requiresFinalStepGathering(WorkflowApproval $approval) : bool
Parameters
- $approval : WorkflowApproval
-
Approval being answered.