mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Adding some docblock info about pagination.
This commit is contained in:
parent
e9d3fcf5cf
commit
f54479e566
1 changed files with 29 additions and 3 deletions
|
@ -19,13 +19,39 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PaginatorComponent
|
* This component is used to handle automatic model data pagination. The primary way to use this
|
||||||
|
* component is to call the paginate() method. There is a convience wrapper on Controller as well.
|
||||||
*
|
*
|
||||||
* This component is used to handle automatic model data pagination
|
* ### Configuring pagination
|
||||||
|
*
|
||||||
|
* You configure pagination using the PaginatorComponent::$settings. This allows you to configure
|
||||||
|
* the default pagination behavior in general or for a specific model. General settings are used when there
|
||||||
|
* are no specific model configuration, or the model you are paginating does not have specific settings.
|
||||||
|
*
|
||||||
|
* {{{
|
||||||
|
* $this->Paginator->settings = array(
|
||||||
|
* 'limit' => 20,
|
||||||
|
* 'maxLimit' => 100
|
||||||
|
* );
|
||||||
|
* }}}
|
||||||
|
*
|
||||||
|
* The above settings will be used to paginate any model. You can configure model specific settings by
|
||||||
|
* keying the settings with the model name.
|
||||||
|
*
|
||||||
|
* {{{
|
||||||
|
* $this->Paginator->settings = array(
|
||||||
|
* 'Post' => array(
|
||||||
|
* 'limit' => 20,
|
||||||
|
* 'maxLimit' => 100
|
||||||
|
* ),
|
||||||
|
* 'Comment' => array( ... )
|
||||||
|
* );
|
||||||
|
* }}}
|
||||||
|
*
|
||||||
|
* This would allow you to have different pagination settings for `Comment` and `Post` models.
|
||||||
*
|
*
|
||||||
* @package cake
|
* @package cake
|
||||||
* @subpackage cake.cake.libs.controller.components
|
* @subpackage cake.cake.libs.controller.components
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
class PaginatorComponent extends Component {
|
class PaginatorComponent extends Component {
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue