Fork me on GitHub

Mesour Pager

Pager component - holding page in session and more

Packagist

  • jQuery 2.0+ Download
  • mesour.components.min.js
  • mesour.advancedPager.min.js

Installation

Suggests

  • None

Demo

Defaults

$defaults = array(
    self::MAIN => array(
        'el' => 'ul',
        'attributes' => array(
            'class' => 'pagination',
        ),
    ),
    self::ITEMS => array(
        'el' => 'li',
    ),
    self::ITEMS_A => array(
        'el' => 'a',
    ),
    self::WRAPPER => array(
        'el' => 'nav',
        'attributes' => array(),
    )
)

Initializing

Warning You have to using with Mesour\UI\Application
$application = new \Mesour\UI\Application();

$application->setRequest($_REQUEST);

$application->run();

$pager = new \Mesour\UI\Pager('pager');

$application->addComponent($pager);

$pager->setCounts(55, 10);

echo $pager->render();