KMP PHP API Reference

GatheringAttendancesController extends AppController
in package

GatheringAttendances Controller

Table of Contents

Constants

VIEW_DATA_EVENT  = 'KMP.plugins.callForViewData'
VIEW_PLUGIN_EVENT  = 'KMP.plugins.callForViewCells'

Properties

$GatheringAttendances  : GatheringAttendancesTable
$isCsvRequest  : bool
$pluginViewCells  : array<string|int, mixed>

Methods

add()  : Response|null|void
Add method - Create new gathering attendance
beforeFilter()  : Response|null|void
Pre-action filter for application-wide processing.
delete()  : Response|null
Delete method
edit()  : Response|null|void
Edit method
initialize()  : void
Initialize controller
isCsvRequest()  : bool
Check if current request is for CSV export.
mobileRsvp()  : Response
Mobile RSVP - Quick add attendance from mobile calendar
mobileUnrsvp()  : Response
Mobile un-RSVP - Remove attendance from mobile calendar
mobileUpdateRsvp()  : Response
Mobile update RSVP - Update attendance visibility settings
myRsvps()  : Response
My RSVPs - Get current user's upcoming RSVPs
paginate()  : array<string|int, GatheringAttendance>|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.
jsonResponse()  : Response
Return JSON response
wantsJson()  : bool
Check if request wants JSON response

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

$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 - Create new gathering attendance

public add() : Response|null|void
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|void

delete()

Delete method

public delete([string|null $id = null ]) : Response|null
Parameters
$id : string|null = null

Gathering Attendance id.

Tags
throws
RecordNotFoundException

When record not found.

Return values
Response|null

Redirects to index.

edit()

Edit method

public edit([string|null $id = null ]) : Response|null|void
Parameters
$id : string|null = null

Gathering Attendance id.

Tags
throws
RecordNotFoundException

When record not found.

Return values
Response|null|void

Redirects on successful edit, renders view otherwise.

isCsvRequest()

Check if current request is for CSV export.

public isCsvRequest() : bool
Return values
bool

mobileRsvp()

Mobile RSVP - Quick add attendance from mobile calendar

public mobileRsvp() : Response
Return values
Response

JSON response

mobileUnrsvp()

Mobile un-RSVP - Remove attendance from mobile calendar

public mobileUnrsvp([string|null $id = null ]) : Response
Parameters
$id : string|null = null

Attendance ID

Return values
Response

JSON response

mobileUpdateRsvp()

Mobile update RSVP - Update attendance visibility settings

public mobileUpdateRsvp([string|null $id = null ]) : Response
Parameters
$id : string|null = null

Attendance ID

Return values
Response

JSON response

myRsvps()

My RSVPs - Get current user's upcoming RSVPs

public myRsvps() : Response
Return values
Response

JSON response or view

paginate()

public paginate([mixed $object = = 'null' ][, array<string|int, mixed> $settings = = '[]' ]) : array<string|int, GatheringAttendance>|ResultSetInterface
Parameters
$object : mixed = = 'null'
$settings : array<string|int, mixed> = = '[]'
Return values
array<string|int, GatheringAttendance>|ResultSetInterface

switchView()

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
throws
ForbiddenException

When authorization fails

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

jsonResponse()

Return JSON response

private jsonResponse(array<string|int, mixed> $data[, int $status = 200 ]) : Response
Parameters
$data : array<string|int, mixed>
$status : int = 200
Return values
Response

        
On this page

Search results