Download the PHP package spyrit/propel-datagrid-bundle without Composer
On this page you can find all versions of the php package spyrit/propel-datagrid-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download spyrit/propel-datagrid-bundle
More information about spyrit/propel-datagrid-bundle
Files in spyrit/propel-datagrid-bundle
Package propel-datagrid-bundle
Short Description Symfony2 Datagrid Bundle for Propel.
License MIT
Homepage https://github.com/spyrit/DatagridBundle.git
Informations about the package propel-datagrid-bundle
PropelDatagridBundle
This bundle helps you to create and manage simple to complex datagrids quickly and easily.
Unlike other similar bundle already available on github and/or packagist, there is no magic method that will render the datagrid in you view. This technical choice allow you to completely customize your datagrid aspect and render (filter fields, buttons, columns, data displayed in each column, pagination links and informations, etc.)
This make it easy to implement and use in both back-end and front-end applications.
Still skeptical ? Let's see how it works !
Installation
Get the code
Since composer is the simplest and fastest way to install dependencies, the only way to install this bundle automatically is to add the following line to your dependencies
composer require spyrit/propel-datagrid-bundle
- Branches 1.x (unmaintained) are for Propel1 and Symfony2
- Branch 1.0 is for backward-compatibility with old projects (PHP < 5.4).
- Branch 1.1 requires PHP-5.4+ for
csanquer/colibri-csv 1.2
- Branch 1.2 integrates new functionnalities like dynamic max-per-page value
- Branch 1.3 implements batch (mass) actions
- Branches 2.x (unmaintained) are for Propel2 and Symfony2
- Branch 2.0 is for backward-compatibility with old projects (PHP < 5.4).
- Branch 2.1 requires PHP-5.4+ for
csanquer/colibri-csv
1.2 - Branch 2.2 integrates new functionnalities like dynamic max-per-page value
- Branch 2.3 implements batch (mass) actions
- Branch 3.0 (unmaintained) is for Propel2 and Symfony3
- Branch 4.0 (unmaintained) is for Propel2 and Symfony4
- Branch 5.0 (maintained) is for Propel2 and Symfony5
- Branch 6.0 (maintained) is for Propel2 and Symfony6
- requires PHP-7.4+
- requires
spyrit/colibri-csv
1.3 - recommends the usage of PropelBundle fork in your composer.json https://github.com/SkyFoxvn/PropelBundle
- BC: DataGrid no longer depends of
Symfony\Component\DependencyInjection\ContainerInterface
. It depends ofSymfony\Component\HttpFoundation\RequestStack
Symfony\Component\Form\FormFactoryInterface
Symfony\Component\Routing\RouterInterface
- BC: Use service autowiring, see https://github.com/spyrit/PropelDatagridBundle?tab=readme-ov-file#declare-your-datagrid---the-controllers-job
Enable the bundle
Enable the bundle in your application
Usage
May be the most interesting part of this documentation which quickly describe how to create and use your first Datagrid.
Create your datagrid - Your Job
To create a datagrid you have to create a single class that inherit from the PropelDatagrid object and implement all methods from the PropelDatagridInterface :
The configureQuery method must return a predefined PropelQuery object (example: BookQuery object) as shown here :
Declare your datagrid - The Controller's Job
Display your datagrid - The view's Job and yours (or designer)
Export datagrid data
Todo
Credit
Our special thanks go to ...
- Charles SANQUER for its fork of the LightCSV library : Colibri CSV used in the export feature.
- Subosito for its standalone Inflector class transformed in a service for our needs.
All versions of propel-datagrid-bundle with dependencies
propel/propel Version ^2.0@alpha|2.0.x-dev
php Version >=7.4.0
symfony/dependency-injection Version ~5.0|~6.0
symfony/form Version ~5.0|~6.0
symfony/framework-bundle Version ~5.0|~6.0
symfony/http-foundation Version ~5.0|~6.0
spyrit/colibri-csv Version ^1.3