GatheringStaffController
extends AppController
in package
GatheringStaff Controller
Manages staff assignments for gatherings including stewards and other roles.
Table of Contents
Constants
- VIEW_DATA_EVENT = 'KMP.plugins.callForViewData'
- VIEW_PLUGIN_EVENT = 'KMP.plugins.callForViewCells'
Properties
- $GatheringStaff : GatheringStaffTable
- $isCsvRequest : bool
- $pluginViewCells : array<string|int, mixed>
Methods
- add() : Response|null|void
- Add method - Add a staff member to a gathering
- beforeFilter() : Response|null|void
- Pre-action filter for application-wide processing.
- delete() : Response|null
- Delete method - Remove a staff member from a gathering
- edit() : Response|null|void
- Edit method - Edit a staff member
- getMemberContactInfo() : Response|null
- AJAX method to get member contact info using public IDs
- initialize() : void
- Initialize controller
- isCsvRequest() : bool
- Check if current request is for CSV export.
- paginate() : array<string|int, GatheringStaff>|ResultSetInterface
- 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
$GatheringStaff
public
GatheringStaffTable
$GatheringStaff
$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 method - Add a staff member to a gathering
public
add([int|null $gatheringId = null ]) : Response|null|void
Parameters
- $gatheringId : int|null = null
-
Gathering ID
Return values
Response|null|void —Redirects on successful add, renders view otherwise.
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 method - Remove a staff member from a gathering
public
delete([int|null $id = null ]) : Response|null
Parameters
- $id : int|null = null
-
Staff ID.
Tags
Return values
Response|null —Redirects to gathering view.
edit()
Edit method - Edit a staff member
public
edit([int|null $id = null ]) : Response|null|void
Parameters
- $id : int|null = null
-
Staff ID.
Tags
Return values
Response|null|void —Redirects on successful edit, renders view otherwise.
getMemberContactInfo()
AJAX method to get member contact info using public IDs
public
getMemberContactInfo() : Response|null
SECURITY: Public ID-based access control:
- Requires gathering_public_id that user has edit permission on
- Uses non-sequential public IDs instead of internal database IDs
- No enumeration possible without valid gathering access
Return values
Response|null —JSON response
initialize()
Initialize controller
public
initialize() : void
isCsvRequest()
Check if current request is for CSV export.
public
isCsvRequest() : bool
Return values
boolpaginate()
public
paginate([mixed $object = = 'null' ][, array<string|int, mixed> $settings = = '[]' ]) : array<string|int, GatheringStaff>|ResultSetInterface
Parameters
- $object : mixed = = 'null'
- $settings : array<string|int, mixed> = = '[]'
Return values
array<string|int, GatheringStaff>|ResultSetInterfaceswitchView()
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