kreyu/data-table-bundle
Composer 安装命令:
composer require kreyu/data-table-bundle
包简介
Streamlines creation process of the data tables
关键字:
README 文档
README
Streamlines the creation process of the data tables in Symfony applications.
About
·
Documentation
·
Reference
Caution
This package is looking for new maintainers or forks with continued development.
For maintainer role, please contact via e-mail: kontakt@swroblewski.pl
Links to the forks can be put into the README of this repo.
About
This bundle allows creating data tables in the same way as you probably do with forms, as every component can be defined with a type class and reused across the application.
Data tables can be sorted, filtered and paginated. Users can personalize the order and visibility of columns. Those features can be persisted between requests, per user, so closing the browser and coming back later will restore the previous state.
Works with Doctrine ORM and arrays out-of-the-box, but can be easily integrated with any data source. Supports theming with Twig and exporting to various data formats.
Warning
This bundle is still in development and is likely to change, or even change drastically. It is NOT production ready, and backwards compatibility is NOT guaranteed until the first stable release.
Familiarity
If you've ever worked with forms in Symfony, you should feel right at home:
class ProductDataTableType extends AbstractDataTableType { public function buildDataTable(DataTableBuilderInterface $builder, array $options): void { $builder ->addColumn('id', NumberColumnType::class) ->addColumn('name', TextColumnType::class) ; } public function configureOptions(OptionsResolver $resolver): void { $resolver->setDefault('translation_domain', 'product'); } }
Creating the data tables using those type classes may also seem very familiar:
class ProductController extends AbstractController { use DataTableFactoryAwareTrait; public function index(Request $request, ProductRepository $repository): Response { $queryBuilder = $repository->createDataTableQueryBuilder(); $dataTable = $this->createDataTable(ProductDataTableType::class, $queryBuilder); $dataTable->handleRequest($request); if ($dataTable->isExporting()) { return $this->file($dataTable->export()); } return $this->render('product/index.html.twig', [ 'products' => $dataTable->createView(), ]) } }
Rendering the data table in Twig is as simple as executing a single function:
{# templates/product/index.html.twig #} <div class="card"> {{ data_table(products, { title: 'Products' }) }} </div>
License
The MIT License (MIT). Please see license file for more information.
kreyu/data-table-bundle 适用场景与选型建议
kreyu/data-table-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 108.46k 次下载、GitHub Stars 达 115, 最近一次更新时间为 2023 年 02 月 02 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「symfony-ux」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 kreyu/data-table-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 kreyu/data-table-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 kreyu/data-table-bundle 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Sylius eCommerce administration panel component.
Doctrine Block management made easy
Symfony bundle for the Rekapager library
File input dropzones multiple for Symfony Forms
Symfony UX Table with search, filter and sorting options.
Effortless file management with Symfony UX and Mezcalito UX FileManager
统计信息
- 总下载量: 108.46k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 115
- 点击次数: 18
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-02-02
