2017 © Pedro Peláez
 

library skeleton-pager

Tigron Skeleton pager functionality

image

tigron/skeleton-pager

Tigron Skeleton pager functionality

  • Monday, July 30, 2018
  • by tigron
  • Repository
  • 2 Watchers
  • 0 Stars
  • 4,217 Installations
  • PHP
  • 2 Dependents
  • 1 Suggesters
  • 0 Forks
  • 0 Open issues
  • 18 Versions
  • 8 % Grown

The README.md

skeleton-pager

Description

This library enables paging functionality for objects created with traits in skeleton-object., (*1)

Installation

Installation via composer:, (*2)

composer require tigron/skeleton-pager

Howto

$pager = new Pager('my_object');

$pager->add_sort_permission('field1');
$pager->add_sort_permission('field2');
$pager->add_sort_permission('field3');
$pager->add_sort_permission('remote_table.field4');
$pager->set_sort('field3');
$pager->set_direction('desc');

if (isset($_POST['search'])) {
    $pager->set_search($_POST['search'], [ 'field2', 'remote_table.field4');
}

$pager->add_condition('field1', '=', 1);
$pager->add_condition('field2', 'IN', [ 1, 2, 3, null]);

$condition = new \Skeleton\Pager\Sql\Condition('my_other_field', '>', '0);
$pager->add_join('remote_table', remote_id', 'local_field', $condition);

$pager->page();

Configuration

/**
 * Items per page
 */
\Skeleton\Pager\Config::$items_per_page = 20;

/**
 * Per page list
 */
\Skeleton\Pager\Config::$per_page_list = [20, 50, 100];

/**
 * Sticky pager
 *
 * Remember pager when navigating away and back to the module
 */
\Skeleton\Pager\Config::$sticky_pager = false;

/**
 * Links template
 *
 * Set the template to render the page links
 */
\Skeleton\Pager\Config::$links_template = '@skeleton-pager\links.twig';

The Versions

30/07 2018

dev-master

9999999-dev

Tigron Skeleton pager functionality

  Sources   Download

MIT

The Development Requires

by Tigron BVBA

30/07 2018

v0.1.10

0.1.10.0

Tigron Skeleton pager functionality

  Sources   Download

MIT

The Development Requires

by Tigron BVBA

22/12 2017

v0.1.8

0.1.8.0

Tigron Skeleton pager functionality

  Sources   Download

MIT

The Development Requires

by Tigron BVBA

22/12 2017

v0.1.9

0.1.9.0

Tigron Skeleton pager functionality

  Sources   Download

MIT

The Development Requires

by Tigron BVBA

24/11 2017

0.1.8

0.1.8.0

Tigron Skeleton pager functionality

  Sources   Download

MIT

The Development Requires

by Tigron BVBA

02/03 2017

v0.1.7

0.1.7.0

Tigron Skeleton pager functionality

  Sources   Download

MIT

The Development Requires

by Tigron BVBA

24/01 2017

v0.1.6

0.1.6.0

Tigron Skeleton pager functionality

  Sources   Download

MIT

The Development Requires

by Tigron BVBA

12/12 2016

v0.1.5

0.1.5.0

Tigron Skeleton pager functionality

  Sources   Download

MIT

The Development Requires

by Tigron BVBA

08/11 2016

v0.1.4

0.1.4.0

Tigron Skeleton pager functionality

  Sources   Download

MIT

The Development Requires

by Tigron BVBA

26/10 2016

v0.1.3

0.1.3.0

Tigron Skeleton pager functionality

  Sources   Download

MIT

The Development Requires

by Tigron BVBA

25/10 2016

v0.1.2

0.1.2.0

Tigron Skeleton pager functionality

  Sources   Download

MIT

The Development Requires

by Tigron BVBA

05/10 2016

v0.1.1

0.1.1.0

Tigron Skeleton pager functionality

  Sources   Download

MIT

The Development Requires

by Tigron BVBA

09/06 2016

v0.1.0

0.1.0.0

Tigron Skeleton pager functionality

  Sources   Download

MIT

The Development Requires

by Tigron BVBA

11/02 2016

v0.0.5

0.0.5.0

Tigron Skeleton pager functionality

  Sources   Download

MIT

The Development Requires

by Tigron BVBA

11/01 2016

v0.0.4

0.0.4.0

Tigron Skeleton pager functionality

  Sources   Download

MIT

The Development Requires

by Tigron BVBA

27/11 2015

v0.0.3

0.0.3.0

Tigron Skeleton pager functionality

  Sources   Download

MIT

The Development Requires

by Tigron BVBA

29/09 2015

v0.0.2

0.0.2.0

Tigron Skeleton pager functionality

  Sources   Download

MIT

The Development Requires

by Tigron BVBA

14/08 2015

v0.0.1

0.0.1.0

Tigron Skeleton pager functionality

  Sources   Download

MIT

The Development Requires

by Tigron BVBA