BestowalTodoCompletionFormProvider
in package
implements
ActionItemCompletionFormProviderInterface, ActionItemLifecycleProviderInterface
uses
LocatorAwareTrait
Supplies Awards-owned completion UI and apply logic for bestowal gathering todos.
Table of Contents
Interfaces
- ActionItemCompletionFormProviderInterface
- Plugin extension point for specialized ActionItem completion forms.
- ActionItemLifecycleProviderInterface
- Optional owner-specific mutations, executed while the owner and item are locked.
Properties
Methods
- __construct() : mixed
- afterTransition() : ServiceResult
- Apply owner mutations inside the ActionItem transaction; failure rolls it back.
- applySubmission() : ServiceResult
- Apply submitted special-form values before the item is completed.
- buildForm() : ActionItemCompletionForm|null
- Build structured form metadata for My To-Dos.
- canHandle() : bool
- Whether this provider owns completion UI/validation for the item.
- transitionConfirmation() : string
- Describe the effects before a user confirms the transition.
- validateCompletion() : ServiceResult
- Validate completion requirements after any submitted values are applied.
- courtSlotRequirementConfig() : array<string, mixed>|null
- Resolve court-slot requirement metadata, including the built-in Added to Agenda fallback.
- eventScheduledTodoForBestowal() : ActionItem|null
- gatheringRequirementConfig() : array<string, mixed>|null
- Resolve gathering requirement metadata, including the built-in Event Scheduled fallback.
- hasPrerequisite() : bool
- loadBestowal() : Bestowal|null
- positiveIntOrNull() : int|null
- requiredFieldConfig() : array<string, mixed>|null
- validatePrerequisites() : ServiceResult
Properties
$bestowalUpdateService
private
BestowalUpdateService|null
$bestowalUpdateService
$courtSlotService
private
BestowalCourtSlotService
$courtSlotService
Methods
__construct()
public
__construct([BestowalUpdateService|null $bestowalUpdateService = null ][, BestowalCourtSlotService|null $courtSlotService = null ]) : mixed
Parameters
- $bestowalUpdateService : BestowalUpdateService|null = null
-
Shared bestowal update service.
- $courtSlotService : BestowalCourtSlotService|null = null
-
Court slot helper.
afterTransition()
Apply owner mutations inside the ActionItem transaction; failure rolls it back.
public
afterTransition(ActionItem $item, int $actorId, string $fromStatus[, array<string|int, mixed> $data = [] ]) : ServiceResult
Parameters
- $item : ActionItem
- $actorId : int
- $fromStatus : string
- $data : array<string|int, mixed> = []
Tags
Return values
ServiceResultapplySubmission()
Apply submitted special-form values before the item is completed.
public
applySubmission(ActionItem $item, array<string|int, mixed> $data, int $actorId, KmpIdentityInterface $user) : ServiceResult
Parameters
- $item : ActionItem
-
Action item.
- $data : array<string|int, mixed>
-
Submitted request data.
- $actorId : int
-
Acting member id.
- $user : KmpIdentityInterface
-
Current user.
Tags
Return values
ServiceResultbuildForm()
Build structured form metadata for My To-Dos.
public
buildForm(ActionItem $item, KmpIdentityInterface $user) : ActionItemCompletionForm|null
Parameters
- $item : ActionItem
-
Action item.
- $user : KmpIdentityInterface
-
Current user.
Tags
Return values
ActionItemCompletionForm|nullcanHandle()
Whether this provider owns completion UI/validation for the item.
public
canHandle(ActionItem $item) : bool
Parameters
- $item : ActionItem
-
Action item.
Tags
Return values
booltransitionConfirmation()
Describe the effects before a user confirms the transition.
public
transitionConfirmation(ActionItem $item, string $operation) : string
Parameters
- $item : ActionItem
- $operation : string
Tags
Return values
stringvalidateCompletion()
Validate completion requirements after any submitted values are applied.
public
validateCompletion(ActionItem $item) : ServiceResult
Parameters
- $item : ActionItem
-
Action item.
Tags
Return values
ServiceResultcourtSlotRequirementConfig()
Resolve court-slot requirement metadata, including the built-in Added to Agenda fallback.
private
courtSlotRequirementConfig(ActionItem $item) : array<string, mixed>|null
Parameters
- $item : ActionItem
-
Action item.
Return values
array<string, mixed>|nulleventScheduledTodoForBestowal()
private
eventScheduledTodoForBestowal(int $bestowalId) : ActionItem|null
Parameters
- $bestowalId : int
-
Bestowal ID.
Return values
ActionItem|nullgatheringRequirementConfig()
Resolve gathering requirement metadata, including the built-in Event Scheduled fallback.
private
gatheringRequirementConfig(ActionItem $item) : array<string, mixed>|null
Parameters
- $item : ActionItem
-
Action item.
Return values
array<string, mixed>|nullhasPrerequisite()
private
hasPrerequisite(ActionItem $item) : bool
Parameters
- $item : ActionItem
-
Action item.
Return values
boolloadBestowal()
private
loadBestowal(ActionItem $item) : Bestowal|null
Parameters
- $item : ActionItem
-
Action item.
Return values
Bestowal|nullpositiveIntOrNull()
private
positiveIntOrNull(mixed $value) : int|null
Parameters
- $value : mixed
-
Raw value.
Return values
int|nullrequiredFieldConfig()
private
requiredFieldConfig(ActionItem $item, string $requiredField) : array<string, mixed>|null
Parameters
- $item : ActionItem
-
Action item.
- $requiredField : string
-
Required field key.
Return values
array<string, mixed>|nullvalidatePrerequisites()
private
validatePrerequisites(ActionItem $item[, Bestowal|null $bestowal = null ]) : ServiceResult
Parameters
- $item : ActionItem
-
Action item.
- $bestowal : Bestowal|null = null