WarrantWorkflowConditions
in package
uses
WorkflowContextAwareTrait
Workflow condition evaluators for warrant operations.
Each method accepts workflow context and config, returns bool.
Table of Contents
Methods
- hasRequiredApprovals() : bool
- Check if a roster has the required number of approvals.
- isMemberWarrantable() : bool
- Check if a member is eligible to receive warrants.
- isRosterApproved() : bool
- Check if a roster has been fully approved.
- isWarrantActive() : bool
- Check if a specific warrant is currently active.
- isWithinWarrantPeriod() : bool
- Check if the current date falls within a warrant period.
- resolveValue() : mixed
- Resolve a config value from context if it starts with '$.'.
Methods
hasRequiredApprovals()
Check if a roster has the required number of approvals.
public
hasRequiredApprovals(array<string|int, mixed> $context, array<string|int, mixed> $config) : bool
Parameters
- $context : array<string|int, mixed>
-
Current workflow context
- $config : array<string|int, mixed>
-
Config with rosterId
Return values
boolisMemberWarrantable()
Check if a member is eligible to receive warrants.
public
isMemberWarrantable(array<string|int, mixed> $context, array<string|int, mixed> $config) : bool
Verifies the warrantable flag AND that membership has not expired.
Parameters
- $context : array<string|int, mixed>
-
Current workflow context
- $config : array<string|int, mixed>
-
Config with memberId
Return values
boolisRosterApproved()
Check if a roster has been fully approved.
public
isRosterApproved(array<string|int, mixed> $context, array<string|int, mixed> $config) : bool
Parameters
- $context : array<string|int, mixed>
-
Current workflow context
- $config : array<string|int, mixed>
-
Config with rosterId
Return values
boolisWarrantActive()
Check if a specific warrant is currently active.
public
isWarrantActive(array<string|int, mixed> $context, array<string|int, mixed> $config) : bool
Parameters
- $context : array<string|int, mixed>
-
Current workflow context
- $config : array<string|int, mixed>
-
Config with warrantId
Return values
boolisWithinWarrantPeriod()
Check if the current date falls within a warrant period.
public
isWithinWarrantPeriod(array<string|int, mixed> $context, array<string|int, mixed> $config) : bool
Parameters
- $context : array<string|int, mixed>
-
Current workflow context
- $config : array<string|int, mixed>
-
Config with startOn, expiresOn
Return values
boolresolveValue()
Resolve a config value from context if it starts with '$.'.
protected
resolveValue(mixed $value, array<string|int, mixed> $context) : mixed
Parameters
- $value : mixed
-
Raw value or context path (e.g. '$.trigger.memberId')
- $context : array<string|int, mixed>
-
Current workflow context
Return values
mixed —Resolved value