=head1 NAME
-SL::Helper::Paginated - Manager mixin for paginating results.
+SL::DB::Helper::Paginated - Manager mixin for paginating results.
=head1 SYNOPSIS
In the manager:
- use SL::Helper::Paginated;
+ use SL::DB::Helper::Paginated;
__PACKAGE__->default_objects_per_page(10); # optional, defaults to 20
C<page> should contain a value between 1 and the maximum pages. Will be
sanitized.
-The parameter C<per_page> is optional. If not given the default value of the
+The parameter C<per_page> is optional, otherwise the default value of the
Manager will be used.
=back
{ per_page => 20, # how many entries per page
max => 5, # number of the last page
- cur => 2, # number of the current page
+ page => 2, # number of the current page
common => [ # an array of hashes for each page
...,
{ active => 1, # set if this is the active page
]
}
-You may assume that C<cur> is sanitized to be within 1..C<max>.
+You may assume that C<page> is sanitized to be within 1..C<max>.
The common list is kept arbitrary by design, so that the algorithm to display
the paginating controls can be changed by solely changing the