jack009/paginator-bundle
最新稳定版本:v1.0.0
Composer 安装命令:
composer require jack009/paginator-bundle
包简介
A paginator bundle to ease pagination within a Symfony application.
README 文档
README
This Bundle is using the Best Practices for Reusable Bundles https://symfony.com/doc/current/bundles/best_practices.html#bundle-name
Paginator Bundle
A simple and flexible paginator bundle for Symfony 8.x and PHP 8.4+ projects. This bundle provides a straightforward way to paginate large datasets, with a default implementation using Doctrine ORM's QueryBuilder and a Twig macro for rendering pagination controls.
Use PaginatorService to paginate your data and render pagination controls in your Twig templates using the provided macro.
Usage
- Used in Symfony 8.x and PHP 8.4+ projects, this bundle provides a simple and flexible way to paginate large datasets.
- Bootstrap v5 compatible by default. (You can customize or creat your own Twig macro to fit other CSS frameworks.)
- Paginator DTO is returned to controllers and templates, containing pagination metadata and the current page's items.
- Provides a Twig macro for rendering pagination controls.
- Default implementation of
IPaginatorServiceusing Doctrine ORM's QueryBuilder. - Easily customizable and extendable to fit specific project needs.
- Includes unit and functional tests to ensure reliability.
- See the documentation reference for detailed class, method and implementation documentation.
Installation
Make sure Composer is installed globally, as explained in the installation chapter of the Composer documentation.
Applications that use Symfony Flex
Open a command console, enter your project directory and execute:
composer require jack009/paginator-bundle
Applications that don't use Symfony Flex
Step 1: Download the Bundle
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
composer require jack009/paginator-bundle
Step 2: Enable the Bundle
Then, enable the bundle by adding it to the list of registered bundles
in the config/bundles.php file of your project:
// config/bundles.php return [ // ... jack009\PaginatorBundle\PaginatorBundle::class => ['all' => true], ];
统计信息
- 总下载量: 10
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-12-26
