IssuesController
extends AppController
in package
Issues Controller - GitHub Issue Submission
Handles anonymous feedback submission to GitHub Issues API. Processes feedback forms and creates GitHub issues with proper labeling.
Table of Contents
Constants
- VIEW_DATA_EVENT = 'KMP.plugins.callForViewData'
- VIEW_PLUGIN_EVENT = 'KMP.plugins.callForViewCells'
Properties
- $isCsvRequest : bool
- $pluginViewCells : array<string|int, mixed>
Methods
- beforeFilter() : void
- Configure anonymous access for feedback submission.
- initialize() : void
- Load shared components: Authentication, Authorization, Flash.
- isCsvRequest() : bool
- Check if current request is for CSV export.
- submit() : Response
- Process anonymous feedback and create GitHub issues.
- 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
$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
beforeFilter()
Configure anonymous access for feedback submission.
public
beforeFilter(EventInterface $event) : void
Parameters
- $event : EventInterface
-
The beforeFilter event
initialize()
Load shared components: Authentication, Authorization, Flash.
public
initialize() : void
isCsvRequest()
Check if current request is for CSV export.
public
isCsvRequest() : bool
Return values
boolsubmit()
Process anonymous feedback and create GitHub issues.
public
submit() : Response
Collects feedback data, sanitizes input, and submits to GitHub API. Returns JSON response with issue URL or error message.
Return values
Response —JSON response with issue data or error
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
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