GatheringActivityWaiversController
extends AppController
in package
GatheringActivityWaivers Controller
Manages waiver requirements for gathering activities, allowing administrators to specify which waiver types are required for participants in specific activities.
Table of Contents
Constants
- VIEW_DATA_EVENT = 'KMP.plugins.callForViewData'
- VIEW_PLUGIN_EVENT = 'KMP.plugins.callForViewCells'
Properties
- $GatheringActivityWaivers : GatheringActivityWaiversTable
- $isCsvRequest : bool
- $pluginViewCells : array<string|int, mixed>
Methods
- add() : Response|null|void
- Add waiver requirement to a gathering activity
- availableWaiverTypes() : Response|null
- Get available waiver types for a gathering activity (AJAX endpoint)
- beforeFilter() : Response|null|void
- Pre-action filter for application-wide processing.
- delete() : Response|null
- Delete waiver requirement from a gathering activity
- initialize() : void
- Load shared components: Authentication, Authorization, Flash.
- isCsvRequest() : bool
- Check if current request is for CSV export.
- switchView() : Response
- Switch between mobile and desktop view modes.
- authorizeCurrentUrl() : void
- Authorize the current URL/action via Authorization component.
- organizeViewCells() : array<string|int, mixed>
- Organize view cells by type and display order.
Constants
VIEW_DATA_EVENT
public
string
VIEW_DATA_EVENT
= 'KMP.plugins.callForViewData'
Event for plugin view data enhancement
VIEW_PLUGIN_EVENT
public
string
VIEW_PLUGIN_EVENT
= 'KMP.plugins.callForViewCells'
Event for plugin view cell registration
Properties
$GatheringActivityWaivers
public
GatheringActivityWaiversTable
$GatheringActivityWaivers
$isCsvRequest
protected
bool
$isCsvRequest
= false
Whether current request is for CSV export (.csv extension)
$pluginViewCells
protected
array<string|int, mixed>
$pluginViewCells
= []
View cells from plugins for current request
Methods
add()
Add waiver requirement to a gathering activity
public
add() : Response|null|void
Return values
Response|null|void —Redirects on successful add
availableWaiverTypes()
Get available waiver types for a gathering activity (AJAX endpoint)
public
availableWaiverTypes([string|null $gatheringActivityId = null ]) : Response|null
Returns list of waiver types not already required for the activity
Parameters
- $gatheringActivityId : string|null = null
-
Gathering Activity ID
Return values
Response|null —JSON response with available waiver types
beforeFilter()
Pre-action filter for application-wide processing.
public
beforeFilter(EventInterface $event) : Response|null|void
Handles: CSV detection, plugin validation, navigation history, view cell loading, and Turbo Frame detection.
Parameters
- $event : EventInterface
-
The beforeFilter event
Return values
Response|null|voiddelete()
Delete waiver requirement from a gathering activity
public
delete([string|null $gatheringActivityId = null ][, string|null $waiverTypeId = null ]) : Response|null
Parameters
- $gatheringActivityId : string|null = null
-
Gathering Activity ID
- $waiverTypeId : string|null = null
-
Waiver Type ID
Return values
Response|null —Redirects to referring page
initialize()
Load shared components: Authentication, Authorization, Flash.
public
initialize() : void
isCsvRequest()
Check if current request is for CSV export.
public
isCsvRequest() : bool
Return values
boolswitchView()
Switch between mobile and desktop view modes.
public
switchView() : Response
Stores preference in session and redirects to appropriate interface. Mobile redirects to viewMobileCard, desktop to profile.
Return values
Response —Redirect response
authorizeCurrentUrl()
Authorize the current URL/action via Authorization component.
protected
authorizeCurrentUrl() : void
Tags
organizeViewCells()
Organize view cells by type and display order.
protected
organizeViewCells(array<string|int, mixed> $viewCells) : array<string|int, mixed>
Unused - view cells organized in ViewCellRegistry
Parameters
- $viewCells : array<string|int, mixed>
-
Flat array of view cell configurations
Return values
array<string|int, mixed> —Organized array grouped by type and sorted by order