Download the PHP package flytachi/winter-mui-data-grid without Composer
On this page you can find all versions of the php package flytachi/winter-mui-data-grid. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download flytachi/winter-mui-data-grid
More information about flytachi/winter-mui-data-grid
Files in flytachi/winter-mui-data-grid
Package winter-mui-data-grid
Short Description Server-side MUI DataGrid adapter for Winter Framework (K2) — declarative schema: pagination, filtering, sorting and column whitelisting out of the box.
License MIT
Homepage https://winterframe.net
Informations about the package winter-mui-data-grid
Winter MUI Data Grid
Server-side adapter that connects MUI X DataGrid to the Winter Framework (K2).
You declare a column schema — which fields may be filtered and sorted, and how
they map to SQL. The library takes the grid's request (page, sort model, filter
model), enforces that schema as a whitelist, builds a parameterized query on top
of your repository, and returns a { rowCount, rows } payload the DataGrid
understands. SQL-injection safe by construction.
Requirements
- PHP >= 8.4
- flytachi/winter-kernel ^3.0
Installation
How it works (60 seconds)
A grid request has three moving parts: pagination, sorting and filtering. This library handles all three around a query you build yourself:
The schema is the contract: a field the frontend references that you did not
declare is rejected (for filtering) or ignored (for sorting). Operators are gated
by each column's FilterType, so a text operator can't be sent against a numeric
column.
Quick start
A minimal "list articles" endpoint. Two tables: articles a joined to authors au.
1. Request
Extend MuiGridRequest. The grid envelope (page, pageSize, sortModel,
filterModel) is hydrated for you by the K2 request layer — add only your own
domain filters:
2. Service
You own the query; the library overlays the grid concerns:
3. Controller
4. The request the frontend sends
5. The response
rowCount is the total matching the filter (for the grid's pager); rows is the
current page.
Documentation
| Guide | What's inside |
|---|---|
| Getting started | End-to-end walkthrough, request/response shape, frontend wiring. |
| Schema & columns | GridSchema, GridColumn, mapping fields to SQL, whitelisting. |
| Filtering | FilterType, operator gating, per-column overrides, AND/OR logic. |
| Sorting | Sort model, custom ORDER BY expressions, default order. |
| Requests & responses | Extending MuiGridRequest, the entity DTOs, MuiGridResponse. |
| Recipes | Joins, subquery search, mappers, category-tree / EXISTS patterns. |
At a glance
FilterType |
Allowed operators |
|---|---|
String |
contains, notContains, startsWith, endsWith, equals, is, not, =, !=, isAnyOf, isEmpty, isNotEmpty |
Number |
equals, is, not, =, !=, >, >=, <, <=, isAnyOf, isEmpty, isNotEmpty |
Boolean |
is, equals, =, isEmpty, isNotEmpty |
Date |
is, not, equals, =, !=, after, onOrAfter, before, onOrBefore, isEmpty, isNotEmpty |
License
MIT — Flytachi