MembersWorkflowConditions
in package
uses
WorkflowContextAwareTrait, LocatorAwareTrait
Workflow condition evaluators for member lifecycle checks.
Each method accepts workflow context and config, returns bool.
Table of Contents
Methods
- hasEmailAddress() : bool
- Check if a member has an email address set.
- hasValidMembership() : bool
- Check if a member has a valid (non-expired) membership.
- isActive() : bool
- Check if a member status is active (any active-capable status).
- isAdult() : bool
- Check if a member is an adult (age >= 18).
- isMinor() : bool
- Check if a member is a minor (age < 18).
- isWarrantable() : bool
- Check if a member is warrantable.
- resolveValue() : mixed
- Resolve a config value from context if it starts with '$.'.
Methods
hasEmailAddress()
Check if a member has an email address set.
public
hasEmailAddress(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
Return values
boolhasValidMembership()
Check if a member has a valid (non-expired) membership.
public
hasValidMembership(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
Return values
boolisActive()
Check if a member status is active (any active-capable status).
public
isActive(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
Return values
boolisAdult()
Check if a member is an adult (age >= 18).
public
isAdult(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
Return values
boolisMinor()
Check if a member is a minor (age < 18).
public
isMinor(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
Return values
boolisWarrantable()
Check if a member is warrantable.
public
isWarrantable(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
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