Download the PHP package mheads/yii-table without Composer
On this page you can find all versions of the php package mheads/yii-table. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mheads/yii-table
More information about mheads/yii-table
Files in mheads/yii-table
Package yii-table
Short Description Universal table provider for Yii applications: columns, filters, sorting, pagination, and export.
License BSD-3-Clause
Informations about the package yii-table
mheads/yii-table
Universal table provider for Yii3 / yiisoft applications: columns, filters, sorting, pagination, export.
yii-table gives you a backend contract for data grids. You describe table schema once, then reuse it for HTTP payloads, filtering, sorting, pagination, and export.
What You Get
- predictable API payload:
config,pagination,columns,filters,sorts,rows; - one place to configure columns, filters, sort options, pagination, and export;
- request parameters applied consistently:
filter,sort,page,prev-page,per-page,export; - CSV/XLSX export and custom formats via
WriterInterface; - support for
Yiisoft\Data\Reader\ReadableDataInterfacesources fromyiisoft/data.
Example application request:
Full example payload:
- examples/payload_example.json
Requirements
- PHP 8.3 - 8.5.
yiisoft/data2.x.psr/http-message2.x.
Optional integrations:
yiisoft/data-dbforQueryDataReader;yiisoft/data-responsefor application-level response formatting;yiisoft/translatorfor i18n adapters;ext-xlswriterfor XLSX export.
Installation
Install the package with Composer:
Quick Start
1. Configure DI
Start with minimal HTTP wiring:
- examples/di/common.php
- Configuration guide
2. Create a table factory
Declare columns, filters, sort options, page size, and export formats:
- examples/usage/product-list-table-factory.php
- Table factory guide
3. Add an HTTP action
Use TableHttpOrchestrator for a single endpoint that applies request parameters and produces a JSON payload or an export response. Split config, rows, and export orchestrators are covered in HTTP usage:
- examples/usage/query-list-action.php
- HTTP usage guide
4. Call your endpoint
5. Try export
Documentation
- Guide
- Examples
Common entry points:
- Filters
- Sorting
- Pagination
- Keyset pagination
- Sync export
- Async export
- I18n
- HTTP error contract
- Advanced documentation map
Examples
The examples are intentionally compact and focused on contract demonstration. They are not intended to be executed directly from vendor/.../examples without adaptation.
- examples/README.md
License
This package is released under the terms of the BSD-3-Clause License. See LICENSE.md for details.