KMP PHP API Reference

QueueController 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
$defaultTable  : string|null
$isCsvRequest  : bool
$pluginViewCells  : array<string|int, mixed>

Methods

addJob()  : Response|null
beforeFilter()  : Response|null|void
Pre-action filter for application-wide processing.
flush()  : Response|null
Remove all failed jobs.
hardReset()  : Response|null
Truncate the queue list / table.
index()  : Response|null|void
Admin center.
initialize()  : void
Load shared components: Authentication, Authorization, Flash.
isCsvRequest()  : bool
Check if current request is for CSV export.
processes()  : Response|null|void
removeJob()  : Response|null
reset()  : Response|null
Mark all failed jobs as ready for re-run.
resetJob()  : Response|null
switchView()  : Response
Switch between mobile and desktop view modes.
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.
refererRedirect()  : Response|null

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

$defaultTable

protected string|null $defaultTable = 'Queue.QueuedJobs'

$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

addJob()

public addJob() : Response|null
Tags
throws
NotFoundException
Return values
Response|null

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

flush()

Remove all failed jobs.

public flush() : Response|null
Return values
Response|null

hardReset()

Truncate the queue list / table.

public hardReset() : Response|null
Return values
Response|null

index()

Admin center.

public index() : Response|null|void

Manage queues from admin backend (without the need to open ssh console window).

Return values
Response|null|void

initialize()

Load shared components: Authentication, Authorization, Flash.

public initialize() : void

isCsvRequest()

Check if current request is for CSV export.

public isCsvRequest() : bool
Return values
bool

processes()

public processes() : Response|null|void
Return values
Response|null|void

removeJob()

public removeJob([int|null $id = null ]) : Response|null
Parameters
$id : int|null = null
Return values
Response|null

reset()

Mark all failed jobs as ready for re-run.

public reset() : Response|null
Return values
Response|null

resetJob()

public resetJob([int|null $id = null ]) : Response|null
Parameters
$id : int|null = null
Tags
throws
NotFoundException
Return values
Response|null

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

refererRedirect()

protected refererRedirect(array<string|int, mixed>|string $default) : Response|null
Parameters
$default : array<string|int, mixed>|string
Return values
Response|null

        
On this page

Search results