GatheringActivityService
in package
uses
LocatorAwareTrait
Manages gathering-activity associations: linking, unlinking, and description updates.
Handles the join table between gatherings and gathering_activities.
Table of Contents
Methods
- addActivity() : array{success: bool, message: string, type: string}
- Link an activity to a gathering.
- courtActivityIds() : array<int, int>
- Return activity types the award catalog allows to present an award.
- editDescription() : array{success: bool, message: string, type: string}
- Update the custom description on a gathering-activity link.
- hasUploadedWaivers() : bool
- Check whether the gathering already has uploaded waivers.
- isCourtActivity() : bool
- Check whether the award catalog permits presentations at this activity type.
- isLinkedCourtActivity() : bool
- Check whether a Court activity is attached to the requested gathering.
- removeActivity() : array{success: bool, message: string, type: string}
- Remove an activity from a gathering.
Methods
addActivity()
Link an activity to a gathering.
public
addActivity(int $gatheringId, int $activityId, array<string|int, mixed> $existingIds[, string|null $customDescription = null ]) : array{success: bool, message: string, type: string}
Parameters
- $gatheringId : int
-
Gathering id
- $activityId : int
-
Activity id to add
- $existingIds : array<string|int, mixed>
-
Already-linked activity ids
- $customDescription : string|null = null
-
Optional custom description
Return values
array{success: bool, message: string, type: string}courtActivityIds()
Return activity types the award catalog allows to present an award.
public
courtActivityIds() : array<int, int>
AwardGatheringActivities is catalog configuration, not an assignment of a bestowal to a gathering. It lets a planner attach the right Court activity before that gathering becomes eligible for matching bestowals. Activity names are intentionally not used because Court labels vary by branch and tier.
Return values
array<int, int>editDescription()
Update the custom description on a gathering-activity link.
public
editDescription(int $gatheringId, int $activityId, string|null $customDescription) : array{success: bool, message: string, type: string}
Parameters
- $gatheringId : int
-
Gathering id
- $activityId : int
-
Activity id
- $customDescription : string|null
-
New description (null/empty to clear)
Return values
array{success: bool, message: string, type: string}hasUploadedWaivers()
Check whether the gathering already has uploaded waivers.
public
hasUploadedWaivers(int $gatheringId) : bool
Parameters
- $gatheringId : int
-
Gathering id
Return values
bool —True if waivers exist for the gathering
isCourtActivity()
Check whether the award catalog permits presentations at this activity type.
public
isCourtActivity(int $activityId) : bool
Parameters
- $activityId : int
-
Gathering activity ID
Return values
boolisLinkedCourtActivity()
Check whether a Court activity is attached to the requested gathering.
public
isLinkedCourtActivity(int $gatheringId, int $activityId) : bool
Parameters
- $gatheringId : int
-
Gathering ID
- $activityId : int
-
Gathering activity ID
Return values
boolremoveActivity()
Remove an activity from a gathering.
public
removeActivity(int $gatheringId, int $activityId) : array{success: bool, message: string, type: string}
Parameters
- $gatheringId : int
-
Gathering id
- $activityId : int
-
Activity id to remove