KMP PHP API Reference

RecommendationBestowalStatePolicyService
in package
uses LocatorAwareTrait

Defines the recommendation state boundary where bestowals take over.

Table of Contents

Constants

HANDOFF_STATE  : mixed = 'Need to Schedule'
NO_ACTION_STATE  : mixed = 'No Action'
BESTOWAL_MANAGED_STATES  : array<int, string> = ['Scheduled', 'Given', 'Announced Not Given']
RETIRED_APPROVAL_STATES  : array<int, string> = ['King Approved', 'Queen Approved']
Legacy states retained only so existing recommendations can be migrated forward.

Methods

assertBestowalSyncMappingsConfigured()  : void
Verify reference data still routes bestowal states back to the expected recommendation states.
assertUserCanTargetRecommendationState()  : void
Reject direct user-facing transitions into states owned by bestowals.
filterUserTargetStatusList()  : array<string, array<int|string, mixed>>
Remove bestowal-managed states from user-facing recommendation dropdowns.
getBestowalManagedStates()  : array<int, string>
isBestowalManagedState()  : bool
Whether a recommendation state is only writable through bestowal sync.
isHandoffState()  : bool
Whether a recommendation state starts the bestowal handoff.

Constants

RETIRED_APPROVAL_STATES

Legacy states retained only so existing recommendations can be migrated forward.

private array<int, string> RETIRED_APPROVAL_STATES = ['King Approved', 'Queen Approved']

Methods

assertBestowalSyncMappingsConfigured()

Verify reference data still routes bestowal states back to the expected recommendation states.

public assertBestowalSyncMappingsConfigured([Table|null $bestowalStatesTable = null ]) : void

The legacy bestowal state machine has been removed in favour of the lifecycle_status model, so there are no bestowal-state sync mappings left to validate. Retained as a no-op for call-site compatibility.

Parameters
$bestowalStatesTable : Table|null = null

assertUserCanTargetRecommendationState()

Reject direct user-facing transitions into states owned by bestowals.

public assertUserCanTargetRecommendationState(string $state) : void
Parameters
$state : string

filterUserTargetStatusList()

Remove bestowal-managed states from user-facing recommendation dropdowns.

public filterUserTargetStatusList(array<string, array<int|string, mixed>> $statusList[, string|null $currentState = null ]) : array<string, array<int|string, mixed>>
Parameters
$statusList : array<string, array<int|string, mixed>>

Grouped status options.

$currentState : string|null = null
Return values
array<string, array<int|string, mixed>>

isBestowalManagedState()

Whether a recommendation state is only writable through bestowal sync.

public isBestowalManagedState(string $state) : bool
Parameters
$state : string
Return values
bool
On this page

Search results