QueueProcessesController
extends AppController
in package
uses
LoadHelperTrait
Table of Contents
Constants
- VIEW_DATA_EVENT = 'KMP.plugins.callForViewData'
- VIEW_PLUGIN_EVENT = 'KMP.plugins.callForViewCells'
Properties
- $QueuedJobs : QueuedJobsTable
- $QueueProcesses : QueueProcessesTable
- $isCsvRequest : bool
- $paginate : array<string, mixed>
- $pluginViewCells : array<string|int, mixed>
Methods
- beforeFilter() : Response|null|void
- Pre-action filter for application-wide processing.
- cleanup() : Response|null|void
- delete() : Response|null|void
- edit() : Response|null|void
- Edit method
- index() : Response|null|void
- Index method
- initialize() : void
- Load shared components: Authentication, Authorization, Flash.
- isCsvRequest() : bool
- Check if current request is for CSV export.
- paginate() : ResultSetInterface<string|int, QueueProcess>
- switchView() : Response
- Switch between mobile and desktop view modes.
- terminate() : Response|null|void
- view() : Response|null|void
- View method
- authorizeCurrentUrl() : void
- Authorize the current URL/action via Authorization component.
- loadHelpers() : void
- 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
$QueuedJobs
public
QueuedJobsTable
$QueuedJobs
$QueueProcesses
public
QueueProcessesTable
$QueueProcesses
$isCsvRequest
protected
bool
$isCsvRequest
= false
Whether current request is for CSV export (.csv extension)
$paginate
protected
array<string, mixed>
$paginate
= ['order' => ['created' => 'DESC']]
$pluginViewCells
protected
array<string|int, mixed>
$pluginViewCells
= []
View cells from plugins for current request
Methods
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|voidcleanup()
public
cleanup() : Response|null|void
Return values
Response|null|void —Redirects to index.
delete()
public
delete([int|null $id = null ][, int|null $sig = null ]) : Response|null|void
Parameters
- $id : int|null = null
-
Queue Process id.
- $sig : int|null = null
-
Signal (defaults to graceful SIGTERM = 15).
Return values
Response|null|void —Redirects to index.
edit()
Edit method
public
edit([int|null $id = null ]) : Response|null|void
Parameters
- $id : int|null = null
-
Queue Process id.
Return values
Response|null|void —Redirects on successful edit, renders view otherwise.
index()
Index method
public
index() : Response|null|void
Return values
Response|null|voidinitialize()
Load shared components: Authentication, Authorization, Flash.
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 = = '[]' ]) : ResultSetInterface<string|int, QueueProcess>
Parameters
- $object : mixed = = 'null'
- $settings : array<string|int, mixed> = = '[]'
Return values
ResultSetInterface<string|int, QueueProcess>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
terminate()
public
terminate([int|null $id = null ]) : Response|null|void
Parameters
- $id : int|null = null
-
Queue Process id.
Return values
Response|null|void —Redirects to index.
view()
View method
public
view([int|null $id = null ]) : Response|null|void
Parameters
- $id : int|null = null
-
Queue Process id.
Return values
Response|null|voidauthorizeCurrentUrl()
Authorize the current URL/action via Authorization component.
protected
authorizeCurrentUrl() : void
Tags
loadHelpers()
protected
loadHelpers() : void
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