GatheringActivityService
in package
uses
LocatorAwareTrait
Manages gathering-activity associations: linking, unlinking, and description updates.
Handles the join table between gatherings and gathering_activities, including waiver-lock checks that prevent modifications when waivers have been uploaded.
Table of Contents
Methods
- addActivity() : array{success: bool, message: string, type: string}
- Link an activity to a gathering.
- editDescription() : array{success: bool, message: string, type: string}
- Update the custom description on a gathering-activity link.
- hasWaiverLock() : bool
- Check whether the gathering has uploaded waivers that lock activity changes.
- 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}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}hasWaiverLock()
Check whether the gathering has uploaded waivers that lock activity changes.
public
hasWaiverLock(int $gatheringId) : bool
Parameters
- $gatheringId : int
-
Gathering id
Return values
bool —True if waivers exist and activities are locked
removeActivity()
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