ApprovalsGridColumns
extends BaseGridColumns
in package
Approvals Grid Column Metadata
Defines column configuration for the My Approvals Dataverse grid. Used for both "Pending Approvals" and "Decisions" system views.
Table of Contents
Constants
- MEMBER_SCOPE_AWAITING_RESPONSE : mixed = 'awaiting_response'
- MEMBER_SCOPE_RESPONDED : mixed = 'responded'
- CANCELLATION_REASON_PROCESS_RESTARTED : mixed = 'approval_process_restarted'
Methods
- applyMemberScopeFilter() : SelectQuery
- Apply a symbolic current-member scope stored with system and custom views.
- getAdminColumns() : array<string, array<string, mixed>>
- Admin columns include Assigned To visible by default.
- getAdminRowActions() : array<string, array<string, mixed>>
- Row actions for the admin All Approvals grid.
- getAdminSystemViews() : array<string, array<string, mixed>>
- System views for the admin All Approvals grid.
- 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>>
- Column definitions for approval grids.
- 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
- getFilterableColumns() : array<string|int, string>
- Get all filterable columns
- getPendingStatusLabel() : string
- Compute the pending status label for a grid approval.
- getRequiredColumns() : array<string|int, string>
- Get required columns
- getRowActions() : array<string, array<string, mixed>>
- Row actions for the approvals grid.
- getSearchableColumns() : array<string|int, string>
- Get searchable columns
- getSortableColumns() : array<string|int, string>
- Get sortable columns
- getStatusExplanation() : string|null
- Explain a process-update reset without exposing arbitrary internal cancellation details.
- getStatusLabel() : string
- Compute the approver-facing status label for any approval state.
- getSystemViews() : array<string, array<string, mixed>>
- System views for the approvals grid.
- isFeedbackResponse() : bool
- Determine whether an approval represents a feedback response.
- normalizeApproverConfig() : array<string, mixed>
- Normalize workflow approval config from database JSON.
- validateColumnKeys() : array<string|int, string>
- Validate that column keys exist
- wasResetForProcessUpdate() : bool
- Determine whether this cancelled approval was replaced after a process update.
Constants
MEMBER_SCOPE_AWAITING_RESPONSE
public
mixed
MEMBER_SCOPE_AWAITING_RESPONSE
= 'awaiting_response'
MEMBER_SCOPE_RESPONDED
public
mixed
MEMBER_SCOPE_RESPONDED
= 'responded'
CANCELLATION_REASON_PROCESS_RESTARTED
private
mixed
CANCELLATION_REASON_PROCESS_RESTARTED
= 'approval_process_restarted'
Methods
applyMemberScopeFilter()
Apply a symbolic current-member scope stored with system and custom views.
public
static applyMemberScopeFilter(SelectQuery $query, mixed $filterValue[, array<string, mixed> $context = [] ]) : SelectQuery
Parameters
- $query : SelectQuery
-
Workflow approvals query.
- $filterValue : mixed
-
Saved symbolic filter value.
- $context : array<string, mixed> = []
-
Grid filter context.
Return values
SelectQuery —Filtered query.
getAdminColumns()
Admin columns include Assigned To visible by default.
public
static getAdminColumns() : array<string, array<string, mixed>>
Return values
array<string, array<string, mixed>>getAdminRowActions()
Row actions for the admin All Approvals grid.
public
static getAdminRowActions() : array<string, array<string, mixed>>
Includes reassignment for pending approvals with an assigned approver.
Return values
array<string, array<string, mixed>>getAdminSystemViews()
System views for the admin All Approvals grid.
public
static getAdminSystemViews() : array<string, array<string, mixed>>
Return values
array<string, array<string, mixed>>getColumn()
Get column by key
public
static getColumn(string $key) : array<string, mixed>|null
Parameters
- $key : string
-
Column key
Return values
array<string, mixed>|nullgetColumnKeys()
Get column keys as array
public
static getColumnKeys() : array<string|int, string>
Return values
array<string|int, string>getColumns()
Column definitions for approval grids.
public
static getColumns() : array<string, array<string, mixed>>
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
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
getPendingStatusLabel()
Compute the pending status label for a grid approval.
public
static getPendingStatusLabel(WorkflowApproval $approval[, array<string, mixed>|null $approverConfig = null ]) : string
Parameters
- $approval : WorkflowApproval
-
Approval entity
- $approverConfig : array<string, mixed>|null = null
-
Normalized approver config
Return values
stringgetRequiredColumns()
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()
Row actions for the approvals grid.
public
static getRowActions() : array<string, array<string, mixed>>
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
getStatusExplanation()
Explain a process-update reset without exposing arbitrary internal cancellation details.
public
static getStatusExplanation(WorkflowApproval $approval) : string|null
Parameters
- $approval : WorkflowApproval
-
Approval entity
Return values
string|nullgetStatusLabel()
Compute the approver-facing status label for any approval state.
public
static getStatusLabel(WorkflowApproval $approval[, array<string, mixed>|null $approverConfig = null ]) : string
Parameters
- $approval : WorkflowApproval
-
Approval entity
- $approverConfig : array<string, mixed>|null = null
-
Normalized approver config
Return values
stringgetSystemViews()
System views for the approvals grid.
public
static getSystemViews([array<string, mixed> $options = [] ]) : array<string, array<string, mixed>>
Parameters
- $options : array<string, mixed> = []
Return values
array<string, array<string, mixed>>isFeedbackResponse()
Determine whether an approval represents a feedback response.
public
static isFeedbackResponse(array<string, mixed>|string|null $approverConfig) : bool
Parameters
- $approverConfig : array<string, mixed>|string|null
-
Approval config
Return values
boolnormalizeApproverConfig()
Normalize workflow approval config from database JSON.
public
static normalizeApproverConfig(array<string, mixed>|string|null $approverConfig) : array<string, mixed>
Parameters
- $approverConfig : array<string, mixed>|string|null
-
Approval config
Return values
array<string, mixed>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
wasResetForProcessUpdate()
Determine whether this cancelled approval was replaced after a process update.
private
static wasResetForProcessUpdate(WorkflowApproval $approval) : bool
Parameters
- $approval : WorkflowApproval
-
Approval entity