Developer guide
Quick start
composer require hrr/t3-datatable- Tag
Gridimplementations in yourInterface Services.yaml - Implement a grid class (table + columns)
- Load the JS module in your backend module template
- Call
initwith your grid identifierData Table ()
Core contract
namespace HRR\T3Datatable\Contract;
interface GridInterface
{
public function getIdentifier(): string;
public function getTableName(): string;
public function build(GridDefinition $definition): void;
}
Copied!
AJAX endpoint
Every grid shares one route, so you never have to register your own AJAX endpoint:
| Route key | t3datatable_data |
|---|---|
| Path | /t3datatable/data |
| Query param | grid={your_grid_identifier} |
| Controller | HRRT3Datatable |
In JavaScript, use TYPO3.settings.ajaxUrls.t3datatable_data.
Response shape
{
"draw": 1,
"recordsTotal": 150,
"recordsFiltered": 42,
"data": [
{"uid": 1, "title": "Example"}
]
}
Copied!
PHP classes
| Class | Role |
|---|---|
Grid | Resolves grids by identifier via DI tag |
Data | Parses DataTables AJAX parameters |
Query | Builds and executes Doctrine queries |
Column | Validates searchable/orderable columns |
Data | Builds JSON payload |