ZenstruckDataGridBundle

Provides a sortable/filterable/paginated datagrid for your entities

NOTE: This bundle is under heavy development, use at your own risk

Provides a sortable/filterable/paginated datagrid for your entities.

Screenshot

View Example Source Code

Full Default Configuration

zenstruck_datagrid:

    # The default template to use when using the twig grid() function.
    default_template:     ZenstruckDataGridBundle:Twitter:blocks.html.twig
    export:
        enabled:              false
        base_dir:             %kernel.cache_dir%/export
        global_options:       []
        types:
            csv:                  true
            xls:                  true
            xlsx:                 true
    grids:

        # Prototype
        name:

            # The entity (in the short notation) to create a grid for.
            entity:               ~ # Required, Example: AppBundle:Product

            # The service id for the generated grid. By default it is: "<bundle_prefix>.grid.<grid_name>".
            service_id:           ~
            grid_class:           ~

            # Customize the grid executor (must implement ExecutorInterface)
            executor_service:     ~

            # Whether or not to use a paginated grid.
            paginated:            true
            fields:

                # Prototype
                name:
                    label:                ~

                    # Set false to hide on display (can still be filtered/sorted)
                    visible:              true
                    filterable:           false
                    filter_value:         ~
                    filter_values:        ~
                    searchable:           false
                    sortable:             false
                    sort_direction:       ~
                    format:               ~
                    align:                ~
                    default:              ~

TODO

  • sortable
  • global filter
  • nested entites filter/sort
  • split out datagrid functionality into a separate library

Copyright (c) 2013 Kevin Bond

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.