Download the PHP package ashleydawson/simple-pagination-bundle without Composer

On this page you can find all versions of the php package ashleydawson/simple-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 simple-pagination-bundle

Simple Pagination Bundle

Build Status

Many thanks to BrowserStack for supporting open source projects like this one.

Symfony bundle for the Simple Pagination library.

Installation

You can install the Simple Pagination Bundle via Composer. To do that, simply require the package:

Run composer update to install the package. Then you'll need to register the bundle in your app/AppKernel.php:

Basic Usage

The simplest collection we can use the paginator service on is an array. Please see below for an extremely simple example of the paginator operating on an array. This shows the service paginating over an array of 12 items.

And in the twig view, it looks like this:

You can override the "items per page" and "pages in range" options at runtime by passing values to the paginator like this:

Please note that this is a very simple example, some advanced use-cases and interfaces are coming up (see below).

Doctrine Example

I've expanded the example above to use Doctrine instead of a static array of items:

And in the twig view, it looks like this:

Configuration

You can configure the Simple Pager Bundle from app/config/config.yml with the following optional parameters:

Twig Function

I've provided a handy twig function to render the built in pagination template. The default template can be configured in your app/config/config.yml or simply overridden as an argument in the twig function.

The arguments passed to the twig function are as follows:

A brief description of each argument is:

An exhaustive twig view example is as follows:

A better example, with the accompanying item list:

Custom Service

If you'd like to define the paginator as a custom service, please use the following service container configuration.

In YAML:

or in XML:

Then use it in your controllers like this:


All versions of simple-pagination-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2.5
symfony/config Version ^3.4|^4.2|^5.0
symfony/dependency-injection Version ^3.4|^4.2|^5.0
symfony/http-kernel Version ^3.4|^4.2|^5.0
symfony/yaml Version ^3.4|^4.2|^5.0
twig/twig Version ^2.7|^3.0
ashleydawson/simple-pagination Version 1.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 ashleydawson/simple-pagination-bundle contains the following files

Loading the files please wait ....