BestowalQueryService
in package
Builds configured ORM queries and grid-processing option arrays for bestowal grids.
Table of Contents
Methods
- applyActiveOnlyFilter() : SelectQuery
- Exclude terminal (given/cancelled) bestowals from an active-work queue query.
- applyHiddenStateVisibility() : SelectQuery
- Apply hidden-state visibility constraints to a bestowals query.
-
buildGatheringBestowalsQuery()
: SelectQuery, gridOptions: array
} - Build the base query and grid options for gathering-scoped bestowal grids.
-
buildIndexQuery()
: SelectQuery, gridOptions: array
} - Build the base query and grid options for the main bestowals index.
- bestowalContain() : array<string, mixed>
- bestowalSelectFields() : array<int, string>|null
- selectOpenTodoCount() : void
- Project the open To-Do count used by the grid badge so that column can be sorted.
- shouldLoadColumn() : bool
Methods
applyActiveOnlyFilter()
Exclude terminal (given/cancelled) bestowals from an active-work queue query.
public
applyActiveOnlyFilter(SelectQuery $query) : SelectQuery
Parameters
- $query : SelectQuery
-
Bestowals query.
Return values
SelectQueryapplyHiddenStateVisibility()
Apply hidden-state visibility constraints to a bestowals query.
public
applyHiddenStateVisibility(SelectQuery $query, bool $canViewHidden) : SelectQuery
Lifecycle bestowals have no hidden states, so this is a pass-through retained for call-site compatibility.
Parameters
- $query : SelectQuery
-
Bestowals query.
- $canViewHidden : bool
-
Whether hidden rows may be included.
Return values
SelectQuerybuildGatheringBestowalsQuery()
Build the base query and grid options for gathering-scoped bestowal grids.
public
buildGatheringBestowalsQuery(Table $bestowalsTable, int $gatheringId, bool $canEdit[, array<string|int, mixed>|null $visibleColumns = null ]) : SelectQuery, gridOptions: array}
Parameters
- $bestowalsTable : Table
-
The Bestowals ORM table.
- $gatheringId : int
-
Gathering ID to filter by.
- $canEdit : bool
-
Whether the current user can manage bestowals.
- $visibleColumns : array<string|int, mixed>|null = null
Return values
SelectQuery, gridOptions: arraybuildIndexQuery()
Build the base query and grid options for the main bestowals index.
public
buildIndexQuery(Table $bestowalsTable, bool $canEdit[, array<string|int, mixed>|null $visibleColumns = null ]) : SelectQuery, gridOptions: array}
Parameters
- $bestowalsTable : Table
-
The Bestowals ORM table.
- $canEdit : bool
-
Whether the current user can manage bestowals.
- $visibleColumns : array<string|int, mixed>|null = null
Return values
SelectQuery, gridOptions: arraybestowalContain()
private
bestowalContain(array<int, string>|null $visibleColumns) : array<string, mixed>
Parameters
- $visibleColumns : array<int, string>|null
Return values
array<string, mixed>bestowalSelectFields()
private
bestowalSelectFields(array<int, string>|null $visibleColumns) : array<int, string>|null
Parameters
- $visibleColumns : array<int, string>|null
Return values
array<int, string>|nullselectOpenTodoCount()
Project the open To-Do count used by the grid badge so that column can be sorted.
private
selectOpenTodoCount(SelectQuery $query, array<int, string>|null $visibleColumns) : void
Parameters
- $query : SelectQuery
-
Bestowals query.
- $visibleColumns : array<int, string>|null
-
Active query columns.
shouldLoadColumn()
private
shouldLoadColumn(string $columnKey, array<int, string>|null $visibleColumns) : bool
Parameters
- $columnKey : string
- $visibleColumns : array<int, string>|null