2017 © Pedro Peláez
 

symfony-bundle simple-pagination-bundle

The SimplePaginationBundle adds the ability to use simple pagination in your application.

image

evheniy/simple-pagination-bundle

The SimplePaginationBundle adds the ability to use simple pagination in your application.

  • Tuesday, April 21, 2015
  • by evheniy
  • Repository
  • 1 Watchers
  • 0 Stars
  • 9,802 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 1 % Grown

The README.md

SimplePaginationBundle

knpbundles.com, (*1)

Latest Stable Version Total Downloads Latest Unstable Version License, (*2)

Scrutinizer Code Quality Build Status, (*3)

Build Status, (*4)

This bundle provides the ability to use simple pagination in your Symfony2 application., (*5)

Installation

SimplePaginationBundle:, (*6)

$ composer require evheniy/simple-pagination-bundle "1.*"

Or add to composer.json

"evheniy/simple-pagination-bundle": "1.*"

AppKernel:, (*7)

    public function registerBundles()
        {
            $bundles = array(
                ...
                new Evheniy\SimplePaginationBundle\SimplePaginationBundle(),
            );
            ...

Controller, (*8)

$pagination = $this->container->get('pagination');
$pageParameter = 'page';
$page = $request->get($pageParameter, 1);//page number
$size = $request->get('size', 10);//items per page
$range = 10;//navigation links on page 

return $this->render(
            'AppBundle:Default:index.html.twig',
            array(
                ...
                'pagination'  => $pagination->paginate(
                    $request->get('_route'),
                    $resultsCount,
                    $page,
                    $size,
                    $range,
                    $request->query->all(),
                    $pageParameter
                )
            )
        );

Layout for [Twitter Bootstrap][3], (*9)

{% include "SimplePaginationBundle::pagination.bootstrap.html.twig" %}

Or simple, (*10)

{% include "SimplePaginationBundle::pagination.html.twig" %}

And styles for example like this, (*11)

<style>
.pagination {
    text-align: center;
}
.pagination span a {
    display: inline-block;
    padding: 4px 8px;
    margin: 3px;
    font-size: 12px;
    font-weight: normal;
    line-height: 1.42857143;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    border: 1px solid transparent;
    border-radius: 4px;
    color: #333;
    background-color: #fff;
    border-color: #ccc;
}
.pagination span a:hover {
    color: #333;
    text-decoration: none;
}
.pagination span a:active {
    outline: thin dotted;
    outline: 5px auto -webkit-focus-ring-color;
    outline-offset: -2px;
}
.pagination span.current {
    display: inline-block;
    padding: 4px 8px;
    margin-bottom: 0;
    font-size: 14px;
    font-weight: bold;
    line-height: 1.42857143;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    background-image: none;
    border: 1px solid transparent;
    border-radius: 4px;
    color: #333;
    background-color: #fff;
    border-color: #ccc;
}
</style>

License

This bundle is under the [MIT][4] license., (*12)

Документация на русском языке, (*13)

Demo, (*14)

The Versions

21/04 2015

dev-master

9999999-dev

The SimplePaginationBundle adds the ability to use simple pagination in your application.

  Sources   Download

MIT

The Requires

 

search symfony2 pagination simple

19/04 2015

1.6

1.6.0.0

The SimplePaginationBundle adds the ability to use simple pagination in your application.

  Sources   Download

MIT

The Requires

 

search symfony2 pagination simple

17/04 2015

1.5

1.5.0.0

The SimplePaginationBundle adds the ability to use simple pagination in your application.

  Sources   Download

MIT

The Requires

 

search symfony2 pagination simple

14/04 2015

1.4

1.4.0.0

The SimplePaginationBundle adds the ability to use simple pagination in your application.

  Sources   Download

MIT

The Requires

 

search symfony2 pagination simple

14/04 2015

1.3

1.3.0.0

The SimplePaginationBundle adds the ability to use simple pagination in your application.

  Sources   Download

MIT

The Requires

 

search symfony2 pagination simple

07/04 2015

1.2

1.2.0.0

The SimplePaginationBundle adds the ability to use simple pagination in your application.

  Sources   Download

MIT

The Requires

 

search symfony2 pagination simple

06/04 2015

1.1

1.1.0.0

The SimplePaginationBundle adds the ability to use simple pagination in your application.

  Sources   Download

MIT

The Requires

 

search symfony2 pagination simple

06/04 2015

1.0

1.0.0.0

The SimplePaginationBundle adds the ability to use simple pagination in your application.

  Sources   Download

MIT

The Requires

 

search symfony2 pagination simple