Download the PHP package tiloweb/pagination-bundle without Composer

On this page you can find all versions of the php package tiloweb/pagination-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package pagination-bundle

TilowebPaginationBundle

CI Latest Stable Version Total Downloads License PHP Version

A simple and elegant pagination bundle for Symfony using Doctrine ORM Paginator. This bundle provides an easy-to-use service for paginating database queries and a Twig function for rendering pagination controls.

✨ Features

📋 Requirements

📥 Installation

Install the bundle using Composer:

If you're using Symfony Flex, the bundle will be automatically enabled. Otherwise, add it to your config/bundles.php:

⚙️ Configuration

The bundle works out of the box with sensible defaults. You can customize it by creating a configuration file:

🚀 Usage

Basic Usage with the Paginator Service

In Your Twig Template

Advanced Repository Pattern

Create a reusable pagination method in your repository:

Custom Pagination Template

Create your own template for complete control over the pagination markup:

Use it in your template:

Or set it globally in your configuration:

📖 PaginationResult API

The PaginationResult object provides useful methods for pagination:

Method Description
getCurrentPage() Returns the current page number
getTotalPages() Returns the total number of pages
getTotalItems() Returns the total count of items
getItemsPerPage() Returns items per page
hasPreviousPage() Returns true if there's a previous page
hasNextPage() Returns true if there's a next page
getPreviousPage() Returns previous page number or null
getNextPage() Returns next page number or null
getFirstItemOnPage() Returns first item index on current page
getLastItemOnPage() Returns last item index on current page
isFirstPage() Returns true if on first page
isLastPage() Returns true if on last page
getPageRange(int $range) Returns array of page numbers for display

🔄 Migration from v2.x

If you're upgrading from version 2.x, please note the following changes:

  1. Namespace change: Classes moved from root to src/ directory
  2. PHP requirement: Minimum PHP version is now 8.2
  3. Symfony requirement: Minimum Symfony version is now 6.4
  4. New service: Use the Paginator service instead of static methods
  5. Return type: paginate() now returns PaginationResult instead of Doctrine's Paginator

🤝 Contributing

Contributions are welcome! Please see CONTRIBUTING.md for details.

📄 License

This bundle is released under the MIT License.

👤 Author

Thibault HENRY


All versions of pagination-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
doctrine/orm Version ^2.14|^3.0
symfony/framework-bundle Version ^6.4|^7.0|^8.0
symfony/http-foundation Version ^6.4|^7.0|^8.0
symfony/http-kernel Version ^6.4|^7.0|^8.0
symfony/dependency-injection Version ^6.4|^7.0|^8.0
symfony/config Version ^6.4|^7.0|^8.0
twig/twig Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tiloweb/pagination-bundle contains the following files

Loading the files please wait ...