zfc-datagrid / zfc-datagrid
Laminas Module that provides a datagrid for different datasources and output formats
Installs: 19 969
Dependents: 1
Suggesters: 0
Security: 0
Stars: 12
Watchers: 5
Forks: 11
Open Issues: 39
Requires
- php: ^7.3 || ~8.0.0
- doctrine/doctrine-laminas-hydrator: ^2.0
- laminas/laminas-cache: ^2.5
- laminas/laminas-http: ^2.8
- laminas/laminas-mvc: ^3.0
- laminas/laminas-paginator: ^2.5
- laminas/laminas-servicemanager: ^3.0
- laminas/laminas-session: ^2.7.4
- laminas/laminas-view: ^2.12
Requires (Dev)
- doctrine/doctrine-orm-module: ^3.0.2 || ^4.0.1
- doctrine/orm: ^2.6.3
- laminas/laminas-coding-standard: ~1.0
- laminas/laminas-console: ^2.5
- laminas/laminas-db: ^2.5
- laminas/laminas-i18n: ^2.5
- laminas/laminas-json: ^2.5 || ^3.3.0
- laminas/laminas-stdlib: ^3.2.1
- laminas/laminas-text: ^2.5
- phpoffice/phpspreadsheet: ^1.11
- phpunit/phpunit: ^9.5.9
- tecnickcom/tcpdf: ^6.2
Suggests
- ext-intl: *
- doctrine/doctrine-orm-module: for doctrine support
- laminas/laminas-json: to support date ranges
- laminas/laminas-text: ~2.5
- phpoffice/phpspreadsheet: ^1.11 for spreadsheet support
- tecnickcom/tcpdf: ^6.2
Replaces
- thadafinser/zfc-datagrid: 2.1.0
- 2.1.0
- dev-develop / 2.0.x-dev
- 2.0.0
- v1.5.0
- v1.5.0-alpha
- dev-master / 1.4.x-dev
- v1.4.1
- v1.4.0
- v1.3.3
- v1.3.2
- v1.3.1
- v1.3.0
- v1.3.0-alpha
- v1.2.1
- v1.2.0
- v1.2.0-rc.1
- v1.2.0-beta
- v1.1.1
- v1.1.0
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- v1.0-beta.5
- v1.0-beta.4
- v1.0-beta.3
- v1.0.0-beta2
- v1.0.0-beta
- 0.11.0
- 0.10.0
- 0.9.2
- 0.9.1
- 0.9.0
- 0.8.3
- 0.8.2
- 0.8.1
- 0.8.0
- 0.7.0
- 0.6.0
- 0.5.5
- 0.5.4
- 0.5.3
- 0.5.2
- 0.5.1
- 0.5.0
- 0.4.0
- 0.3.1
- 0.3.0
- 0.2.0
- 0.1.0
- dev-ThaDafinser-patch-1
This package is auto-updated.
Last update: 2025-03-01 00:11:56 UTC
README
A datagrid for Laminas where the data input and output can be whatever you want...:-)
Over 400 tests and 1000 assertions testing the stability currently!
If you need help, please use following ressources
If you want to help out on this project:
- seek through the issues
- documentation
- ...any other help
Features
- Datasources: Doctrine2 (QueryBuilder + Collections), Laminas\Db, PhpArray, ... (others possible)
- Output types: jqGrid, Bootstrap table, PDF, Excel, CSV, console, ... (others possible)
- Bootstrap table with Daterange Filter need to load manually js and css
- different column types
- custom formatting, type based formatting (string, date, number, array...)
- column/row styling for all or based on value comparison
- column filtering and sorting
- external data can be included to the dataset (like gravator or any other)
- pagination
- custom toolbar / view
- ...
Installation
Install it with composer
composer require zfc-datagrid/zfc-datagrid -o
NOTE: with 1.x we dropped support for other installation technics. Especially the ZF2 autoloading was dropped. You just need to switch to composer installation, which will make your life easier, since it comes with all needed features
Add ZfcDatagrid
to your config/application.config.php
Finally create the folder: data/ZfcDatagrid
You can continue
Test if it works
NOTE: This needs the additional module
ZfcDatagridExamples
https://github.com/ThaDafinser/ZfcDatagridExamples ####Browser####
Attention! Only PhpArray works out of the box! For Laminas\Db\Sql\Select and Doctrine2 you need to install DoctrineORMModule (Doctrin2 creates the database for Laminas\Db\Sql\Select)
- PhpArray http://YOUR-PROJECT/zfcDatagrid/person/bootstrap
- Doctrine2 http://YOUR-PROJECT/zfcDatagrid/personDoctrine2/bootstrap
- Laminas\Db\Sql\Select http://YOUR-PROJECT/zfcDatagrid/personLaminas/bootstrap
####Console####
If you just type php index.php
a help for all commands will be shown
cd YOUR-PROJECT/public/
php index.php datagrid person
php index.php datagrid person --page 2
php index.php datagrid person --sortBys=age
php index.php datagrid person --sortBys=age,givenName --sortDirs=ASC,DESC
Continue with your own datagrid
Please read Documentation
You can also use the zfc-data-grid-plugin to create columns with an array configuration, instead of objects!