Download the PHP package pentiminax/ux-datatables without Composer
On this page you can find all versions of the php package pentiminax/ux-datatables. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pentiminax/ux-datatables
More information about pentiminax/ux-datatables
Files in pentiminax/ux-datatables
Package ux-datatables
Short Description DataTables.net integration for Symfony
License MIT
Homepage https://github.com/pentiminax/ux-datatables
Informations about the package ux-datatables
UX DataTables
UX DataTables is a Symfony bundle integrating the DataTables library in Symfony applications.
Requirements
- PHP 8.3 or higher
- Symfony StimulusBundle (installed through Symfony UX)
- Composer
Installation
Install the library via Composer:
Usage
1. Declare a DataTable
Column variants are configured fluently after new():
disableColumnControl() removes all ColumnControl controls for the column without disabling
DataTables search processing.
2. Wire it in a controller
3. Render in Twig
Tip: run
php bin/console make:datatableto scaffold a DataTable class from any Doctrine entity.
Security
The bundle auto-registers a set of Ajax routes under /datatables/ajax/* (ux_datatables_ajax_data,
ux_datatables_ajax_delete, ux_datatables_ajax_edit, ux_datatables_ajax_edit_form,
ux_datatables_ajax_edit_form_submit, ux_datatables_ajax_detail, ux_datatables_ajax_templates).
The table token embedded in the rendered HTML identifies which table is requested, not who is requesting it — it is not a user-authentication or per-user authorization mechanism. If a table is displayed behind a firewall but these routes are left unprotected, the underlying data (and the edit/delete actions) can be reached by anyone holding the token.
Protect the routes with an access_control rule that matches the pages rendering your tables:
Delete actions and inline boolean toggles additionally require an active session for CSRF
protection. Without one, their controls are rendered disabled (mutationsEnabled: false in the
table payload).
See Securing Ajax Routes for details.
Documentation
All versions of ux-datatables with dependencies
symfony/config Version ^7.0 || ^8.0
symfony/dependency-injection Version ^7.0 || ^8.0
symfony/http-kernel Version ^7.0 || ^8.0
symfony/stimulus-bundle Version ^2.0 || ^3.0
symfony/property-access Version ^7.0 || ^8.0
symfony/security-bundle Version ^7.0 || ^8.0
symfony/security-csrf Version ^7.0 || ^8.0