Developer guide 

Quick start 

  1. composer require hrr/t3-datatable
  2. Tag GridInterface implementations in your Services.yaml
  3. Implement a grid class (table + columns)
  4. Load the JS module in your backend module template
  5. Call initDataTable() with your grid identifier

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 HRRT3DatatableControllerDataTableController::dataAction

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
GridRegistry Resolves grids by identifier via DI tag
DataTableRequest Parses DataTables AJAX parameters
QueryEngine Builds and executes Doctrine queries
ColumnAllowlist Validates searchable/orderable columns
DataTableResponse Builds JSON payload