DataverseGridTrait
Unified grid processing for dataverse-style grids with saved views, filters, and sorting.
Features: saved/system views, user defaults, column picker, advanced filters, multi-column sorting, search, and pagination. See app/docs/dataverse-grid-*.md for usage.
Table of Contents
Methods
- applyCustomFilterHandlers() : SelectQuery
- Apply custom filter handlers for columns with complex filtering logic
- buildDataverseGridSearchCondition() : array<string, mixed>|null
- Build a search condition for one Dataverse grid column.
- buildDataverseGridState() : array<string|int, mixed>
- Build complete grid state object (single source of truth)
- buildExportDataFromEntities() : array<string|int, mixed>
- Build export data from pre-processed entities (Data Mode)
- buildExportDataFromQuery() : array<string|int, mixed>
- Build export data from database query (Query Mode)
- convertDateBoundaryToUtc() : string
- Convert a date boundary string from kingdom timezone to UTC for SQL comparison.
- extractExportValue() : string
- Extract export value from entity using column metadata
- extractFilterFromExpression() : mixed
- Recursively extract a filter value from an expression tree
- extractFilterFromSystemView() : mixed
- Extract a specific filter value from a system view configuration
- extractFilterFromViewConfig() : mixed
- Extract a specific filter value from a saved user view's config
- extractFilterGrouping() : array<string|int, mixed>
- Extract filter grouping information from expression tree
- extractLockedDateRangeDefaults() : array<string, array{value: string|null, operator: string}>
- Extract canonical bounds for active date-range filters whose fields are locked.
- extractSystemViewDefaults() : array{filters: array, dateRange: array, dateRangeOperators: array, search: ?string, skipFilterColumns: array}
- Extract default filters/search metadata for a system view configuration
- formatExportValue() : string
- Format value for CSV export
- handleCsvExport() : Response
- Handle CSV export from grid result
- isCsvExportRequest() : bool
- Check if the current request is for CSV export
- isDataverseTableFrameRequest() : bool
- loadAvailableViews() : array<int, mixed>
- Load and cache available views for the current request.
- loadFilterOptions() : array<string|int, mixed>
- Load filter options from a data source
- loadFilterOptionsCached() : array<int, array{value: string, label: string}>
- Load filter options with per-request cache.
- processDataverseGrid() : array<string|int, mixed>
- Process dataverse grid request with unified logic
- renderDataverseGridResponse() : void
- Render consistent dataverse grid responses for outer/table turbo frames.
- resolveDataverseGridQueryContext() : DataverseGridQueryContext
- Resolve Dataverse grid column context for early query construction.
- resolveNestedValue() : mixed
- Resolve nested value from entity using dot notation path
- applyDataverseGridSort() : SelectQuery
- Apply a standard field sort or delegate to a column-specific sort handler.
- collectDataverseExpressionColumnKeys() : void
- columnKeyForDataverseField() : string
- extractDataverseGridConfigColumnKeys() : array<int, string>
- isDataverseGridNumericSearchColumn() : bool
- normalizeDataverseGridColumnConfig() : array<int, string>
- normalizeLockedDateBoundary() : string|null
- Normalize a persisted date boundary while retaining an intentionally open bound.
- resolveDataverseGridActiveColumns() : array<int, string>
- Resolve hidden-but-active query dependency columns.
-
resolveDataverseGridViewContext()
: array{selectedSystemView: array
|null, currentView: mixed} - Resolve active saved/system view enough for pre-query column dependency planning.
- resolveDataverseGridVisibleColumns() : array<int, string>
- Resolve UI-visible columns using the same precedence as processDataverseGrid().
Methods
applyCustomFilterHandlers()
Apply custom filter handlers for columns with complex filtering logic
protected
applyCustomFilterHandlers(SelectQuery $query, array<string|int, mixed> $customFilterColumns, string $tableName, array<string|int, mixed> $currentFilters, mixed $currentView, array<string|int, mixed>|null $selectedSystemView, bool $dirtyFilters) : SelectQuery
Columns can define a customFilterHandler in their metadata to specify
a static method that handles their filtering. This allows complex filter
logic (like querying multiple tables) to be defined alongside the column
definition rather than requiring special controller knowledge.
Filter values are extracted from:
- Canonical current filter state (query parameters plus enforced locked values)
- Saved user view configuration (when loading a saved view)
- System view configuration (when loading a system view)
Parameters
- $query : SelectQuery
-
The query to filter
- $customFilterColumns : array<string|int, mixed>
-
Columns with customFilterHandler defined
- $tableName : string
-
The main table name
- $currentFilters : array<string|int, mixed>
-
Current filter values from query params
- $currentView : mixed
-
Current saved user view (or null)
- $selectedSystemView : array<string|int, mixed>|null
-
Current system view config (or null)
- $dirtyFilters : bool
-
Whether user explicitly modified filters
Return values
SelectQuery —The filtered query
buildDataverseGridSearchCondition()
Build a search condition for one Dataverse grid column.
protected
buildDataverseGridSearchCondition(string $field, array<string, mixed>|null $columnMeta, string $searchTerm) : array<string, mixed>|null
Parameters
- $field : string
-
Fully-qualified database field.
- $columnMeta : array<string, mixed>|null
-
Column metadata, when available.
- $searchTerm : string
-
User-entered search term.
Return values
array<string, mixed>|nullbuildDataverseGridState()
Build complete grid state object (single source of truth)
protected
buildDataverseGridState(mixed $currentView, array<string|int, mixed>|null $selectedSystemView, array<string|int, mixed>|null $systemViews, iterable<string|int, mixed> $availableViews, Member|null $currentMember, string|int|null $preferredViewId, string $search, array<string|int, mixed> $filters, array<string|int, mixed> $filterOptions, array<string|int, mixed> $dropdownFilterColumns, array<string|int, mixed> $dateRangeFilterColumns, array<string|int, mixed> $sort, array<string|int, mixed> $visibleColumns, array<string|int, mixed> $allColumns, string $gridKey, int $pageSize, bool $showAllTab, bool $canAddViews, bool $canFilter, bool $hasSearch, bool $hasDropdownFilters, bool $hasDateRangeFilters, array<string|int, mixed> $skipFilterColumns, bool $canExportCsv, bool $showFilterPills, bool $showViewTabs, bool $enableColumnPicker[, array<string|int, mixed> $lockedFilters = [] ][, bool $enableBulkSelection = false ][, array<string|int, mixed> $bulkSelection = [] ][, array<string|int, mixed> $bulkActions = [] ][, array<string|int, mixed> $bulkSelectionDataFields = [] ][, string|null $bulkSelectionDisabledField = null ][, bool $bulkSelectionHideDisabledControl = false ][, bool $includeViewMetadata = true ][, bool $includeAllColumns = true ]) : array<string|int, mixed>
Parameters
- $currentView : mixed
-
Current saved view entity (null for system views or "All")
- $selectedSystemView : array<string|int, mixed>|null
-
Currently selected system view
- $systemViews : array<string|int, mixed>|null
-
All available system views
- $availableViews : iterable<string|int, mixed>
-
Collection of saved views
- $currentMember : Member|null
-
Authenticated member
- $preferredViewId : string|int|null
-
Preferred view ID from user preferences
- $search : string
-
Current search term
- $filters : array<string|int, mixed>
-
Active filters by column key
- $filterOptions : array<string|int, mixed>
-
Available filter options by column key
- $dropdownFilterColumns : array<string|int, mixed>
-
Metadata for filterable columns
- $dateRangeFilterColumns : array<string|int, mixed>
- $sort : array<string|int, mixed>
-
Current sort configuration
- $visibleColumns : array<string|int, mixed>
-
Array of visible column keys
- $allColumns : array<string|int, mixed>
-
Complete column metadata
- $gridKey : string
-
Unique grid identifier
- $pageSize : int
-
Number of rows per page
- $showAllTab : bool
-
Whether to show "All" tab
- $canAddViews : bool
-
Whether users can create custom views
- $canFilter : bool
-
Whether filtering is enabled
- $hasSearch : bool
- $hasDropdownFilters : bool
- $hasDateRangeFilters : bool
- $skipFilterColumns : array<string|int, mixed>
-
Columns with filter UI but not query application
- $canExportCsv : bool
-
Whether CSV export button is shown
- $showFilterPills : bool
-
Whether active filter pills/badges are displayed
- $showViewTabs : bool
-
Whether view tabs are displayed
- $enableColumnPicker : bool
-
Whether column picker is available
- $lockedFilters : array<string|int, mixed> = []
-
Filter column keys that cannot be removed by users
- $enableBulkSelection : bool = false
- $bulkSelection : array<string|int, mixed> = []
-
Bulk selection accessibility label configuration
- $bulkActions : array<string|int, mixed> = []
- $bulkSelectionDataFields : array<string|int, mixed> = []
- $bulkSelectionDisabledField : string|null = null
- $bulkSelectionHideDisabledControl : bool = false
- $includeViewMetadata : bool = true
- $includeAllColumns : bool = true
Return values
array<string|int, mixed> —Complete grid state
buildExportDataFromEntities()
Build export data from pre-processed entities (Data Mode)
protected
buildExportDataFromEntities(iterable<string|int, mixed> $data, array<string|int, mixed> $visibleColumns, array<string|int, mixed> $columnsMetadata) : array<string|int, mixed>
Extracts values from entities using column metadata configuration. Supports virtual properties, nested relations via renderField, and custom exportValue callbacks.
Parameters
- $data : iterable<string|int, mixed>
-
Pre-processed entities or arrays
- $visibleColumns : array<string|int, mixed>
-
List of visible column keys
- $columnsMetadata : array<string|int, mixed>
-
Column configuration metadata
Return values
array<string|int, mixed> —Transformed data ready for CSV export
buildExportDataFromQuery()
Build export data from database query (Query Mode)
protected
buildExportDataFromQuery(Query $query, array<string|int, mixed> $visibleColumns, array<string|int, mixed> $columnsMetadata, string $tableName) : array<string|int, mixed>
Builds SQL SELECT statements and executes query for simple database fields. Best for exports that don't require computed fields.
Parameters
- $query : Query
-
Database query to execute
- $visibleColumns : array<string|int, mixed>
-
List of visible column keys
- $columnsMetadata : array<string|int, mixed>
-
Column configuration metadata
- $tableName : string
-
Full table name for model alias extraction
Return values
array<string|int, mixed> —Transformed data ready for CSV export
convertDateBoundaryToUtc()
Convert a date boundary string from kingdom timezone to UTC for SQL comparison.
protected
convertDateBoundaryToUtc(string $dateValue, bool $isStart) : string
The database stores datetimes in UTC. Date-range filters use kingdom-timezone dates
(e.g., "today" = 2026-04-09 in US/Eastern). Without conversion, a SQL comparison
like start_on <= '2026-04-09 23:59:59' would miss records stored as
'2026-04-10 03:00:00' UTC (which is still April 9 in Eastern).
Parameters
- $dateValue : string
-
Date string (YYYY-MM-DD or YYYY-MM-DD HH:MM:SS)
- $isStart : bool
-
True for start-of-day boundary (00:00:00), false for end-of-day (23:59:59)
Return values
string —UTC datetime string for SQL comparison
extractExportValue()
Extract export value from entity using column metadata
protected
extractExportValue(mixed $entity, string $columnKey, array<string|int, mixed> $columnMeta) : string
Resolution order:
- exportValue callback if defined in column metadata
- renderField path for nested entity access (e.g., 'member.name_for_herald')
- Direct property access using column key
Parameters
- $entity : mixed
-
Entity or array to extract value from
- $columnKey : string
-
Column key identifier
- $columnMeta : array<string|int, mixed>
-
Column metadata configuration
Return values
string —Extracted and formatted value
extractFilterFromExpression()
Recursively extract a filter value from an expression tree
protected
extractFilterFromExpression(array<string|int, mixed> $expression, string $columnKey) : mixed
Parameters
- $expression : array<string|int, mixed>
-
The expression node to search
- $columnKey : string
-
The column key to find
Return values
mixed —The filter value or null if not found
extractFilterFromSystemView()
Extract a specific filter value from a system view configuration
protected
extractFilterFromSystemView(array<string|int, mixed> $systemView, string $columnKey) : mixed
Parameters
- $systemView : array<string|int, mixed>
-
The system view configuration
- $columnKey : string
-
The column key to find
Return values
mixed —The filter value or null if not found
extractFilterFromViewConfig()
Extract a specific filter value from a saved user view's config
protected
extractFilterFromViewConfig(mixed $view, string $columnKey) : mixed
Parameters
- $view : mixed
-
The GridView entity
- $columnKey : string
-
The column key to find
Return values
mixed —The filter value or null if not found
extractFilterGrouping()
Extract filter grouping information from expression tree
protected
extractFilterGrouping(array<string|int, mixed>|null $selectedSystemView, array<string|int, mixed> $skipFilterColumns) : array<string|int, mixed>
Analyzes the expression tree to determine OR relationships between filters. Returns metadata that the frontend can use to display visual OR indicators.
Parameters
- $selectedSystemView : array<string|int, mixed>|null
-
Currently active system view
- $skipFilterColumns : array<string|int, mixed>
-
Columns that show as pills but don't query
Return values
array<string|int, mixed> —Grouping metadata with 'orGroups' array
extractLockedDateRangeDefaults()
Extract canonical bounds for active date-range filters whose fields are locked.
protected
extractLockedDateRangeDefaults(array<string, mixed> $viewConfig, array<int, string> $lockedFilters, array<string, array<string, mixed>> $columnsMetadata) : array<string, array{value: string|null, operator: string}>
Parameters
- $viewConfig : array<string, mixed>
-
Active system or saved-view config.
- $lockedFilters : array<int, string>
-
Locked filter keys.
- $columnsMetadata : array<string, array<string, mixed>>
-
Grid column metadata.
Return values
array<string, array{value: string|null, operator: string}> —Date parameter bounds.
extractSystemViewDefaults()
Extract default filters/search metadata for a system view configuration
protected
extractSystemViewDefaults(array<string, mixed> $systemViewConfig) : array{filters: array, dateRange: array, dateRangeOperators: array, search: ?string, skipFilterColumns: array}
Parameters
- $systemViewConfig : array<string, mixed>
-
Raw system view config
Return values
array{filters: array, dateRange: array, dateRangeOperators: array, search: ?string, skipFilterColumns: array}formatExportValue()
Format value for CSV export
protected
formatExportValue(mixed $value) : string
Handles various data types and converts to string representation.
Parameters
- $value : mixed
-
Value to format
Return values
string —Formatted string value
handleCsvExport()
Handle CSV export from grid result
protected
handleCsvExport(array<string|int, mixed> $result, CsvExportService $csvExportService, string $entityName[, string|null $tableName = null ][, iterable<string|int, mixed>|null $data = null ]) : Response
Generates a CSV export response from the grid processing result. Supports two modes:
-
Query Mode (default): Uses the query from result to build SQL SELECT statements. Best for simple fields that map directly to database columns.
-
Data Mode: Pass pre-processed data with computed/virtual fields already populated. Best for exports that include calculated fields, virtual properties, or complex transformations that can't be done in SQL.
Column Value Resolution (in order of precedence):
exportValuecallback in column metadata - custom formatting functionrenderFieldpath (e.g., 'member.name_for_herald') - for nested entity accessqueryFieldfor relation columns in query mode- Direct column key access on entity/array
Parameters
- $result : array<string|int, mixed>
-
Result from processDataverseGrid() with isCsvExport flag
- $csvExportService : CsvExportService
-
CSV export service instance
- $entityName : string
-
Base name for the export file (e.g., 'members', 'warrants')
- $tableName : string|null = null
-
Optional table name for fetchTable (e.g., 'Awards.Recommendations' for plugin tables) If not provided, uses ucfirst($entityName)
- $data : iterable<string|int, mixed>|null = null
-
Optional pre-processed data. If provided, uses data mode instead of query mode. Data should be an iterable of entities or arrays with all computed fields populated.
Tags
Return values
Response —CSV download response
isCsvExportRequest()
Check if the current request is for CSV export
protected
isCsvExportRequest() : bool
Return values
bool —True if CSV export is requested
isDataverseTableFrameRequest()
protected
isDataverseTableFrameRequest() : bool
Return values
bool —Whether request is for inner table frame.
loadAvailableViews()
Load and cache available views for the current request.
protected
loadAvailableViews(string $gridKey, int $memberId) : array<int, mixed>
Parameters
- $gridKey : string
-
Grid identifier
- $memberId : int
-
Authenticated member id
Return values
array<int, mixed>loadFilterOptions()
Load filter options from a data source
protected
loadFilterOptions(array<string|int, mixed>|string $source) : array<string|int, mixed>
Supports multiple formats for filterOptionsSource:
-
Simple string (table name): Uses 'id' for value, 'name' for label
'filterOptionsSource' => 'Branches' -
Array with table: Database table with full control
'filterOptionsSource' => [ 'table' => 'Waivers.WaiverTypes', // Required: table name for fetchTable() 'valueField' => 'id', // Optional: field for option value (default: 'id') 'labelField' => 'name', // Optional: field for option label (default: 'name') 'conditions' => ['is_active' => true], // Optional: filter conditions 'order' => ['name' => 'ASC'], // Optional: sort order (default: labelField ASC) ] -
Array with appSetting: Load from app settings (YAML array)
'filterOptionsSource' => [ 'appSetting' => 'Branches.Types', // Required: app setting key ]The app setting should contain a YAML array like: ['Kingdom', 'Principality', 'Barony'] Both value and label will be set to the array item value.
-
Array with method: Call a static method on a class to get options
'filterOptionsSource' => [ 'method' => 'getGatheringsFilterOptions', // Required: static method name 'class' => 'Awards\\KMP\\GridColumns\\RecommendationsGridColumns', // Required: fully qualified class name ]The method should return array of ['value' => string, 'label' => string].
Parameters
- $source : array<string|int, mixed>|string
-
Source identifier string (table name) or configuration array
Return values
array<string|int, mixed> —Filter options as array of ['value' => string, 'label' => string]
loadFilterOptionsCached()
Load filter options with per-request cache.
protected
loadFilterOptionsCached(array<string|int, mixed>|string $source) : array<int, array{value: string, label: string}>
Parameters
- $source : array<string|int, mixed>|string
-
filterOptionsSource configuration
Return values
array<int, array{value: string, label: string}>processDataverseGrid()
Process dataverse grid request with unified logic
protected
processDataverseGrid(array<string|int, mixed> $config) : array<string|int, mixed>
This method handles all aspects of grid processing including view management, filtering, searching, sorting, and pagination. It supports both saved user views and system-defined views.
Parameters
- $config : array<string|int, mixed>
-
Grid configuration with the following keys:
- gridKey (string): Unique identifier for the grid
- gridColumnsClass (string): Fully qualified class name for grid columns metadata
- baseQuery (Query): Base query object to start with
- tableName (string): Primary table name for field qualification
- defaultSort (array): Default sort configuration ['field' => 'direction']
- defaultPageSize (int): Default number of records per page (default: 25)
- systemViews (array|null): Optional array of system views (for Warrants-style grids)
- defaultSystemView (string|null): Default system view key (required if systemViews provided)
- queryCallback (callable|null): Optional callback to modify query per system view
- showAllTab (bool): Whether to show "All" tab (default: true for saved views, false for system views)
- canAddViews (bool): Whether users can create custom views (default: true)
- canFilter (bool): Whether user filtering is enabled (default: true). When false, users cannot add/remove filters via the UI or query parameters. However, filters defined by system views are ALWAYS applied regardless of this setting.
- canExportCsv (bool): Whether CSV export button is shown (default: true)
- showFilterPills (bool): Whether active filter pills/badges are displayed (default: true)
- showViewTabs (bool): Whether view tabs are displayed (default: true)
- enableColumnPicker (bool): Whether column picker is available (default: true)
- lockedFilters (array): Array of filter column keys that cannot be removed by users. Locked filters will not show remove (×) buttons and their values cannot be cleared via query string parameters. Useful for embedded grids where context filters (e.g., member_id) must always be applied.
- enableBulkSelection (bool): Whether row selection checkboxes are shown (default: false)
- bulkSelection (array): Bulk selection accessibility label configuration. Keys: selectAllLabel, rowLabelTemplate, disabledLabel. rowLabelTemplate supports {field_key} placeholders resolved from each row, including dotted paths and column renderField aliases.
- bulkActions (array): Array of bulk action button configurations when enableBulkSelection is true. Each action is an array with keys: label, icon, modalTarget, permission.
- disablePagination (bool): When true, bypasses the paginator and returns all matching
records. Use for views (e.g. calendar) that are already filtered to a bounded date
range and must show every result without an arbitrary row cap.
Caller responsibility*: the
baseQueryMUST include WHERE clauses that bound the result set (e.g. a date range) to avoid fetching unbounded data. (default: false)
NOTE: Authorization scope must be applied to baseQuery BEFORE calling this method. Use
$baseQuery = $this->Authorization->applyScope($baseQuery, 'index');in your controller before passing the query to processDataverseGrid().
Return values
array<string|int, mixed> —Result array with keys: data, gridState, columnsMetadata, etc.
renderDataverseGridResponse()
Render consistent dataverse grid responses for outer/table turbo frames.
protected
renderDataverseGridResponse(array<string, mixed> $result, string $frameId[, string|null $collectionVar = null ][, array<string, mixed> $extraViewVars = [] ]) : void
Parameters
- $result : array<string, mixed>
-
processDataverseGrid() result
- $frameId : string
-
Outer frame id (e.g. members-grid)
- $collectionVar : string|null = null
-
Optional collection variable name to set (e.g. members)
- $extraViewVars : array<string, mixed> = []
-
Additional vars to expose to template
resolveDataverseGridQueryContext()
Resolve Dataverse grid column context for early query construction.
protected
resolveDataverseGridQueryContext(array<string, mixed> $config[, array<string, mixed>|null $selectedSystemView = null ][, mixed $currentView = null ][, bool $viewContextResolved = false ]) : DataverseGridQueryContext
Parameters
- $config : array<string, mixed>
-
Grid configuration.
- $selectedSystemView : array<string, mixed>|null = null
-
Already-resolved system view when called from processDataverseGrid().
- $currentView : mixed = null
-
Already-resolved saved view when called from processDataverseGrid().
- $viewContextResolved : bool = false
-
Whether null selected/current view values are already authoritative.
Return values
DataverseGridQueryContextresolveNestedValue()
Resolve nested value from entity using dot notation path
protected
resolveNestedValue(mixed $entity, string $path) : mixed
Parameters
- $entity : mixed
-
Entity to traverse
- $path : string
-
Dot-notation path (e.g., 'member.name_for_herald')
Return values
mixed —Resolved value or null if path doesn't exist
applyDataverseGridSort()
Apply a standard field sort or delegate to a column-specific sort handler.
private
applyDataverseGridSort(SelectQuery $query, string $columnKey, string $direction, array<string, mixed> $columnMeta, string $tableName) : SelectQuery
Custom handlers are useful when a relation sort needs a correlated subquery or another expression that remains valid in paginator/eager-loader subqueries.
Parameters
- $query : SelectQuery
-
Query being sorted.
- $columnKey : string
-
Grid column key.
- $direction : string
-
Requested sort direction.
- $columnMeta : array<string, mixed>
-
Column metadata.
- $tableName : string
-
Primary query alias.
Return values
SelectQuery —Sorted query.
collectDataverseExpressionColumnKeys()
private
collectDataverseExpressionColumnKeys(mixed $expression, array<int, string> &$columns) : void
Parameters
- $expression : mixed
- $columns : array<int, string>
columnKeyForDataverseField()
private
columnKeyForDataverseField(string $field, array<string, array<string, mixed>> $columnsMetadata) : string
Parameters
- $field : string
- $columnsMetadata : array<string, array<string, mixed>>
Return values
stringextractDataverseGridConfigColumnKeys()
private
extractDataverseGridConfigColumnKeys(array<string, mixed> $config) : array<int, string>
Parameters
- $config : array<string, mixed>
Return values
array<int, string>isDataverseGridNumericSearchColumn()
private
isDataverseGridNumericSearchColumn(array<string, mixed>|null $columnMeta) : bool
Parameters
- $columnMeta : array<string, mixed>|null
-
Column metadata.
Return values
boolnormalizeDataverseGridColumnConfig()
private
normalizeDataverseGridColumnConfig(mixed $columns) : array<int, string>
Parameters
- $columns : mixed
Return values
array<int, string>normalizeLockedDateBoundary()
Normalize a persisted date boundary while retaining an intentionally open bound.
private
normalizeLockedDateBoundary(mixed $value) : string|null
Parameters
- $value : mixed
Return values
string|nullresolveDataverseGridActiveColumns()
Resolve hidden-but-active query dependency columns.
private
resolveDataverseGridActiveColumns(array<string, mixed> $config, array<string, array<string, mixed>> $columnsMetadata, array<string, mixed>|null $selectedSystemView, mixed $currentView) : array<int, string>
Parameters
- $config : array<string, mixed>
-
Grid configuration.
- $columnsMetadata : array<string, array<string, mixed>>
- $selectedSystemView : array<string, mixed>|null
- $currentView : mixed
Return values
array<int, string>resolveDataverseGridViewContext()
Resolve active saved/system view enough for pre-query column dependency planning.
private
resolveDataverseGridViewContext(array<string, mixed> $config) : array{selectedSystemView: array|null, currentView: mixed}
Parameters
- $config : array<string, mixed>
-
Grid configuration.
Return values
array{selectedSystemView: arrayresolveDataverseGridVisibleColumns()
Resolve UI-visible columns using the same precedence as processDataverseGrid().
private
resolveDataverseGridVisibleColumns(class-string $gridColumnsClass, array<string, array<string, mixed>> $columnsMetadata, array<string, mixed>|null $selectedSystemView, mixed $currentView) : array<int, string>
Parameters
- $gridColumnsClass : class-string
- $columnsMetadata : array<string, array<string, mixed>>
- $selectedSystemView : array<string, mixed>|null
- $currentView : mixed