KMP PHP API Reference

RecommendationsGridColumns extends BaseGridColumns
in package

Recommendations Grid Column Metadata

Defines the column configuration for the Award Recommendations Dataverse-style grid view. Recommendations represent award suggestions that flow through a complex state machine from submission through ceremonial presentation.

This grid is used in multiple contexts:

  • Recommendations index: All recommendations with status-based tabs
  • Member submitted recs tab: Recommendations submitted by a specific member
  • Recs for member tab: Recommendations for a specific member
  • Gathering awards tab: Recommendations scheduled for a specific gathering

Table of Contents

Methods

applyGatheringsFilter()  : SelectQuery
Apply gatherings filter to recommendations query.
getColumn()  : array<string, mixed>|null
Get column by key
getColumnKeys()  : array<string|int, string>
Get column keys as array
getColumns()  : array<string, array<string, mixed>>
Get column metadata for recommendations grid
getDefaultVisibleColumns()  : array<string, array<string, mixed>>
Get only columns that are visible by default
getDropdownFilterColumns()  : array<string, array<string, mixed>>
Get columns with dropdown filters
getExportableColumns()  : array<string|int, string>
Get exportable columns for CSV export
getFilterableColumns()  : array<string|int, string>
Get all filterable columns
getGatheringsFilterOptions()  : array<string|int, array<string, string>>
Get gatherings filter options for recommendations grid.
getHiddenStates()  : array<string|int, string>
Get hidden states that require ViewHidden permission
getRequiredColumns()  : array<string|int, string>
Get required columns
getRowActions()  : array<string, array<string, mixed>>
Get row actions for recommendations grid
getSearchableColumns()  : array<string|int, string>
Get searchable columns
getSortableColumns()  : array<string|int, string>
Get sortable columns
getStateFilterOptions()  : array<string|int, array<string, string>>
Get state filter options based on user permissions
getSystemViews()  : array<string, array<string, mixed>>
Get system views for recommendations
renderAssignedGathering()  : string
Custom cell renderer for assigned gathering display.
validateColumnKeys()  : array<string|int, string>
Validate that column keys exist

Methods

applyGatheringsFilter()

Apply gatherings filter to recommendations query.

public static applyGatheringsFilter(SelectQuery $query, string|array<string|int, mixed> $filterValue[, array<string|int, mixed> $context = [] ]) : SelectQuery

Custom filter handler that filters recommendations to include those where:

  • The gathering is linked via awards_recommendations_events (recommendation events)
  • OR the recommendation's member is attending the gathering with share_with_crown or share_with_kingdom

This method is called automatically by DataverseGridTrait when a gatherings filter is applied (either from query params or saved view config).

Parameters
$query : SelectQuery

The query to filter

$filterValue : string|array<string|int, mixed>

One or more gathering IDs to filter by

$context : array<string|int, mixed> = []

Additional context (tableName, columnKey, columnMeta)

Return values
SelectQuery

The filtered query

getColumn()

Get column by key

public static getColumn(string $key) : array<string, mixed>|null
Parameters
$key : string

Column key

Return values
array<string, mixed>|null

getColumnKeys()

Get column keys as array

public static getColumnKeys() : array<string|int, string>
Return values
array<string|int, string>

getColumns()

Get column metadata for recommendations grid

public static getColumns() : array<string, array<string, mixed>>

Defines all available columns for the recommendations grid. Different system views will show different subsets of these columns.

Return values
array<string, array<string, mixed>>

getDefaultVisibleColumns()

Get only columns that are visible by default

public static getDefaultVisibleColumns() : array<string, array<string, mixed>>
Return values
array<string, array<string, mixed>>

getDropdownFilterColumns()

Get columns with dropdown filters

public static getDropdownFilterColumns() : array<string, array<string, mixed>>

Returns array of column metadata for columns that have dropdown filter type or other UI-based filters (e.g., 'dropdown', 'is-populated')

Return values
array<string, array<string, mixed>>

Column metadata indexed by key

getExportableColumns()

Get exportable columns for CSV export

public static getExportableColumns() : array<string|int, string>

Returns columns that should be included in CSV exports. Excludes columns marked with exportable = false.

Return values
array<string|int, string>

Exportable column keys

getFilterableColumns()

Get all filterable columns

public static getFilterableColumns() : array<string|int, string>

Returns array of column keys that can be filtered

Return values
array<string|int, string>

Filterable column keys

getGatheringsFilterOptions()

Get gatherings filter options for recommendations grid.

public static getGatheringsFilterOptions() : array<string|int, array<string, string>>

Returns a list of gatherings relevant to award recommendations:

  • All future gatherings that include at least one award-capable activity (gatherings_gathering_activities -> award_gathering_activities)
  • All past gatherings that have scheduled or given awards
Return values
array<string|int, array<string, string>>

Filter options for gatherings dropdown

getHiddenStates()

Get hidden states that require ViewHidden permission

public static getHiddenStates() : array<string|int, string>
Return values
array<string|int, string>

List of state values that require special permission

getRequiredColumns()

Get required columns

public static getRequiredColumns() : array<string|int, string>

Returns array of column keys that are required and cannot be hidden

Return values
array<string|int, string>

Required column keys

getRowActions()

Get row actions for recommendations grid

public static getRowActions() : array<string, array<string, mixed>>

Returns action configurations for recommendations. Edit is modal-based, View is a link. State changes are handled through bulk selection modal, not row actions.

Return values
array<string, array<string, mixed>>

getSearchableColumns()

Get searchable columns

public static getSearchableColumns() : array<string|int, string>

Returns array of column keys that should be included in text search

Return values
array<string|int, string>

Searchable column keys

getSortableColumns()

Get sortable columns

public static getSortableColumns() : array<string|int, string>

Returns array of column keys that can be sorted

Return values
array<string|int, string>

Sortable column keys

getStateFilterOptions()

Get state filter options based on user permissions

public static getStateFilterOptions([bool $canViewHidden = false ]) : array<string|int, array<string, string>>

Returns state options that respect the canViewHidden permission. States configured in Awards.RecommendationStatesRequireCanViewHidden are excluded if user lacks the ViewHidden permission.

Parameters
$canViewHidden : bool = false

Whether the user can view hidden states

Return values
array<string|int, array<string, string>>

Filter options for state dropdown

getSystemViews()

Get system views for recommendations

public static getSystemViews([array<string|int, mixed> $options = [] ]) : array<string, array<string, mixed>>

Defines the status-based tabs and their filter configurations.

Supported contexts (via $options['context']):

  • index (default): main recommendations grid
  • memberSubmitted: member profile "Submitted Award Recs" tab
  • recsForMember: member profile "Recs For Member" tab
  • gatheringAwards: gathering detail "Awards" tab
Parameters
$options : array<string|int, mixed> = []

Runtime context (timezone, scope, etc.)

Return values
array<string, array<string, mixed>>

renderAssignedGathering()

Custom cell renderer for assigned gathering display.

public static renderAssignedGathering(mixed $value, object|array<string|int, mixed> $row, AppView $view) : string

Shows [CANCELLED] prefix for cancelled gatherings with visual warning styling.

Parameters
$value : mixed

The cell value (gathering name)

$row : object|array<string|int, mixed>

The full row data

$view : AppView

The view instance

Return values
string

Rendered HTML

validateColumnKeys()

Validate that column keys exist

public static validateColumnKeys(array<string|int, string> $keys) : array<string|int, string>
Parameters
$keys : array<string|int, string>

Column keys to validate

Return values
array<string|int, string>

Invalid keys


        
On this page

Search results