2017 © Pedro Peláez
 

library arraypaginator

Simple array pagination in view

image

poznet/arraypaginator

Simple array pagination in view

  • Sunday, November 22, 2015
  • by j00seph
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Array-Paginator

Simple Array Pagginator Bundle for Symfony 2, (*1)

SensioLabsInsight, (*2)

As long as you paginate query elements ( using for example KNP Paginator Bundle ) there is no problem, but sometimes there is a need to paginate array elements in view., (*3)

I got problem with implementation KNPPaginatorBundle to paginate elements of array , so i created this., (*4)

Installation

Simple : composer require poznet/arraypaginator, (*5)

Usage

in parameters, (*6)

define how much element's you want to show on eah page :, (*7)

parameters:
    poznet_array_paginator:
      - perpage: 9

in Controller, (*8)

$tab=array();
$pagination=$this->get('poznet.array.paginator')->paginate($tab);

return array('pagination'=>$pagination);

in View - render array elements as normally ( foreach ) - in place where you want to have pagination add twig function {{ pagination() }}, (*9)

TODO

in future : - some better routing (cofigured by parameters) - using views togenerate pagination, (*10)

Licence

This Bundle is licensed under the MIT License. Feel free to contribute., (*11)

The Versions

22/11 2015

dev-master

9999999-dev https://github.com/poznet/Array-Paginator

Simple array pagination in view

  Sources   Download

MIT

The Requires

  • php >=5.3

 

pagination array paginator array pagination