KMP PHP API Reference

GridViewsTable extends BaseTable
in package

GridViewsTable - Manage Saved Grid View Configurations

Provides CRUD for saved grid views with Dataverse-style view management. Supports system defaults, user defaults, and view priority resolution.

Tags
@method

\App\Model\Entity\GridView get(mixed $primaryKey, array|string $finder = 'all', ...)

Table of Contents

Constants

CACHE_GROUPS_TO_CLEAR  = []
CACHES_TO_CLEAR  = []
ID_CACHES_TO_CLEAR  = []

Properties

$Members  : MembersTable|BelongsTo

Methods

addBranchScopeQuery()  : SelectQuery
Add branch-based data scoping to a query.
afterDelete()  : void
After delete hook to capture impersonation audit trail entries.
afterSave()  : void
After-save handler for automatic cache invalidation.
buildRules()  : RulesChecker
Build rules for maintaining data integrity
findByGrid()  : SelectQuery
Find views by grid key
findSystemDefault()  : SelectQuery
Find system default view for a grid
findUserDefault()  : SelectQuery
Find user's default view for a grid
initialize()  : void
Initialize method - Configure table relationships and behaviors
newEmptyEntity()  : GridView
validationDefault()  : Validator
Default validation rules
logImpersonationAction()  : void
Record impersonated writes to audit log table.

Constants

CACHE_GROUPS_TO_CLEAR

protected array<string|int, string> CACHE_GROUPS_TO_CLEAR = []

Cache groups to clear entirely on save

CACHES_TO_CLEAR

protected array<string|int, array{string, string}> CACHES_TO_CLEAR = []

Static cache entries to clear on save

ID_CACHES_TO_CLEAR

protected array<string|int, array{string, string}> ID_CACHES_TO_CLEAR = []

Entity-ID cache prefixes to clear on save

Properties

Methods

addBranchScopeQuery()

Add branch-based data scoping to a query.

public addBranchScopeQuery(SelectQuery $query, array<string|int, int> $branchIDs) : SelectQuery

Child tables should override for custom branch relationships.

Parameters
$query : SelectQuery

The query to modify

$branchIDs : array<string|int, int>

Authorized branch IDs

Return values
SelectQuery

Query with branch filtering

afterDelete()

After delete hook to capture impersonation audit trail entries.

public afterDelete(EventInterface $event, EntityInterface $entity, ArrayObject $options) : void
Parameters
$event : EventInterface

Delete event

$entity : EntityInterface

Entity being deleted

$options : ArrayObject

Delete options

afterSave()

After-save handler for automatic cache invalidation.

public afterSave(EventInterface $event, EntityInterface $entity, ArrayObject $options) : void
Parameters
$event : EventInterface

The afterSave event

$entity : EntityInterface

The saved entity

$options : ArrayObject

Save options

buildRules()

Build rules for maintaining data integrity

public buildRules(RulesChecker $rules) : RulesChecker
Parameters
$rules : RulesChecker

The rules object to configure

Return values
RulesChecker

findByGrid()

Find views by grid key

public findByGrid(SelectQuery $query, array<string, mixed> $options) : SelectQuery

Returns system default and user-specific views for a grid.

Parameters
$query : SelectQuery

Query object

$options : array<string, mixed>

Options including 'gridKey' and optionally 'memberId'

Return values
SelectQuery

findSystemDefault()

Find system default view for a grid

public findSystemDefault(SelectQuery $query, array<string, mixed> $options) : SelectQuery
Parameters
$query : SelectQuery

Query object

$options : array<string, mixed>

Options including 'gridKey'

Return values
SelectQuery

findUserDefault()

Find user's default view for a grid

public findUserDefault(SelectQuery $query, array<string, mixed> $options) : SelectQuery
Parameters
$query : SelectQuery

Query object

$options : array<string, mixed>

Options including 'gridKey' and 'memberId'

Return values
SelectQuery

initialize()

Initialize method - Configure table relationships and behaviors

public initialize(array<string, mixed> $config) : void
Parameters
$config : array<string, mixed>

The configuration for the Table.

validationDefault()

Default validation rules

public validationDefault(Validator $validator) : Validator
Parameters
$validator : Validator

Validator instance

Return values
Validator

logImpersonationAction()

Record impersonated writes to audit log table.

protected logImpersonationAction(string $defaultOperation, EntityInterface $entity) : void
Parameters
$defaultOperation : string

Operation fallback (save/delete)

$entity : EntityInterface

Affected entity


        
On this page

Search results