ActivitiesWorkflowConditions
in package
uses
WorkflowContextAwareTrait
Workflow condition evaluators for the Activities plugin.
Each method accepts workflow context and config, returns bool.
Table of Contents
Methods
- hasRequiredApprovals() : bool
- Check if an authorization has the required number of approvals.
- isRenewalEligible() : bool
- Check if a member is eligible to renew an authorization for an activity.
- memberMeetsAgeRequirement() : bool
- Check if a member meets the age requirement for an activity.
- resolveValue() : mixed
- Resolve a config value from context if it starts with '$.'.
Methods
hasRequiredApprovals()
Check if an authorization has the required number of approvals.
public
hasRequiredApprovals(array<string|int, mixed> $context, array<string|int, mixed> $config) : bool
Uses the authorization's approval_count field (maintained by the workflow engine) rather than counting legacy approval records.
Parameters
- $context : array<string|int, mixed>
-
Current workflow context
- $config : array<string|int, mixed>
-
Config with authorizationId
Return values
boolisRenewalEligible()
Check if a member is eligible to renew an authorization for an activity.
public
isRenewalEligible(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 memberId, activityId
Return values
boolmemberMeetsAgeRequirement()
Check if a member meets the age requirement for an activity.
public
memberMeetsAgeRequirement(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 memberId, activityId
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