zenstruck/datagrid-bundle

此包已被废弃,不再维护。没有建议的替代包。

为您的实体提供可排序/可过滤/可分页的数据网格。

v0.1.0 2013-12-11 15:24 UTC

This package is auto-updated.

Last update: 2020-10-28 14:16:32 UTC


README

注意:此包正在积极开发中,请自行承担风险

为您的实体提供可排序/可过滤/可分页的数据网格。

Screenshot

查看示例源代码

完整默认配置

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:              ~

待办事项

  • 可排序
  • 全局过滤
  • 嵌套实体过滤/排序
  • 将数据网格功能拆分为独立的库