KMP PHP API Reference

MemberRolesController extends AppController
in package

MemberRoles Controller

Table of Contents

Constants

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

Properties

$memberRoles  : MemberRolesTable
$isCsvRequest  : bool
$pluginViewCells  : array<string|int, mixed>

Methods

add()  : Response|null|void
Add method
beforeFilter()  : Response|null|void
Pre-action filter for application-wide processing.
deactivate()  : mixed
Deactivate.
initialize()  : void
Set up this component.
isCsvRequest()  : bool
Check if current request is for CSV export.
roleMemberRoles()  : mixed
Role member roles.
switchView()  : Response
Switch between mobile and desktop view modes.
addConditions()  : mixed
Add conditions.
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()

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

isCsvRequest()

Check if current request is for CSV export.

public isCsvRequest() : bool
Return values
bool

roleMemberRoles()

Role member roles.

public roleMemberRoles(mixed $state, mixed $id) : mixed
Parameters
$state : mixed
$id : mixed

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

addConditions()

Add conditions.

protected addConditions(mixed $query) : mixed
Parameters
$query : mixed

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


        
On this page

Search results