Inheritance diagram for PaginatorHelper:

Public Member Functions | |
| __hasPage ($model, $page) | |
| __pagingLink ($which, $title=null, $options=array(), $disabledTitle=null, $disabledOptions=array()) | |
| counter ($options=array()) | |
| current ($model=null) | |
| defaultModel () | |
| first ($first= '<< first', $options=array()) | |
| hasNext ($model=null) | |
| hasPage ($model=null, $page=1) | |
| hasPrev ($model=null) | |
| last ($last= 'last >>', $options=array()) | |
| link ($title, $url=array(), $options=array()) | |
| next ($title= 'Next >>', $options=array(), $disabledTitle=null, $disabledOptions=array()) | |
| numbers ($options=array()) | |
| options ($options=array()) | |
| params ($model=null) | |
| prev ($title= '<< Previous', $options=array(), $disabledTitle=null, $disabledOptions=array()) | |
| sort ($title, $key=null, $options=array()) | |
| sortDir ($model=null, $options=array()) | |
| sortKey ($model=null, $options=array()) | |
| url ($options=array(), $asArray=false, $model=null) | |
Public Attributes | |
| $__defaultModel = null | |
| $helpers = array('Html', 'Ajax') | |
| $options = array() | |
Definition at line 33 of file paginator.php.
| PaginatorHelper::__hasPage | ( | $ | model, | |
| $ | page | |||
| ) |
Protected method
Definition at line 363 of file paginator.php.
References Helper::$params, and params().
| PaginatorHelper::__pagingLink | ( | $ | which, | |
| $ | title = null, |
|||
| $ | options = array(), |
|||
| $ | disabledTitle = null, |
|||
| $ | disabledOptions = array() | |||
| ) |
Protected method for generating prev/next links
Definition at line 299 of file paginator.php.
References $options, $url, link(), Helper::model(), params(), and url().
| PaginatorHelper::counter | ( | $ | options = array() |
) |
Returns a counter string for the paged result set
| mixed | $options Options for the counter string. See options for list of keys. |
Definition at line 393 of file paginator.php.
References $out, current(), defaultModel(), options(), Helper::output(), params(), and start().
| PaginatorHelper::current | ( | $ | model = null |
) |
Gets the current page of the recordset for the given model
| string | $model Optional model name. Uses the default if none is specified. |
Definition at line 119 of file paginator.php.
References Helper::$params, and params().
Referenced by counter(), link(), numbers(), sortDir(), and url().
| PaginatorHelper::defaultModel | ( | ) |
| PaginatorHelper::first | ( | ) |
Returns a first or set of numbers for the first pages
| mixed | $first if string use as label for the link, if numeric print page numbers | |
| mixed | $options |
Definition at line 560 of file paginator.php.
References $out, Helper::$params, defaultModel(), link(), and params().
Referenced by numbers().
| PaginatorHelper::hasNext | ( | $ | model = null |
) |
Returns true if the given result set is not at the last page
| string | $model Optional model name. Uses the default if none is specified. |
Definition at line 341 of file paginator.php.
References __hasPage(), and next().
| PaginatorHelper::hasPage | ( | $ | model = null, |
|
| $ | page = 1 | |||
| ) |
Returns true if the given result set has the page number given by $page
| string | $model Optional model name. Uses the default if none is specified. | |
| int | $page The page number - if not set defaults to 1. |
Definition at line 351 of file paginator.php.
References params().
| PaginatorHelper::hasPrev | ( | $ | model = null |
) |
Returns true if the given result set is not at the first page
| string | $model Optional model name. Uses the default if none is specified. |
Definition at line 332 of file paginator.php.
References __hasPage(), and prev().
| PaginatorHelper::last | ( | $ | last = 'last >>', |
|
| $ | options = array() | |||
| ) |
Returns a last or set of numbers for the last pages
| mixed | $last if string use as label for the link, if numeric print page numbers | |
| mixed | $options |
Definition at line 604 of file paginator.php.
References $out, Helper::$params, defaultModel(), link(), and params().
Referenced by numbers().
| PaginatorHelper::link | ( | $ | title, | |
| $ | url = array(), |
|||
| $ | options = array() | |||
| ) |
Generates a plain or Ajax link with pagination parameters
| string | $title Title for the link. | |
| mixed | $url Url for the action. See Router::url() | |
| array | $options Options for the link. See options for list of keys. |
Definition at line 250 of file paginator.php.
References $options, $url, current(), Set::filter(), Helper::model(), options(), and url().
Referenced by __pagingLink(), first(), last(), numbers(), and sort().
| PaginatorHelper::next | ( | $ | title = 'Next >>', |
|
| $ | options = array(), |
|||
| $ | disabledTitle = null, |
|||
| $ | disabledOptions = array() | |||
| ) |
Generates a "next" link for a set of paged records
| string | $title Title for the link. Defaults to 'Next >>'. | |
| mixed | $options Options for pagination link. See options for list of keys. | |
| string | $disabledTitle Title when the link is disabled. | |
| mixed | $disabledOptions Options for the disabled pagination link. See options for list of keys. |
Definition at line 206 of file paginator.php.
References $options, and __pagingLink().
Referenced by hasNext().
| PaginatorHelper::numbers | ( | $ | options = array() |
) |
Returns a set of numbers for the paged result set uses a modulus to decide how many numbers to show on each side of the current page (default: 8)
| mixed | $options Options for the numbers, (before, after, model, modulus, separator) |
Definition at line 450 of file paginator.php.
References $out, Helper::$params, current(), defaultModel(), first(), last(), link(), Helper::output(), and params().
| PaginatorHelper::options | ( | $ | options = array() |
) |
Sets default options for all pagination links
| mixed | $options Default options for pagination links. If a string is supplied - it is used as the DOM id element to update. See options for list of keys. |
Definition at line 90 of file paginator.php.
References $options, defaultModel(), and params().
Referenced by counter(), link(), sortDir(), sortKey(), and url().
| PaginatorHelper::params | ( | $ | model = null |
) |
Gets the current paging parameters from the resultset for the given model
| string | $model Optional model name. Uses the default if none is specified. |
Definition at line 75 of file paginator.php.
References defaultModel().
Referenced by __hasPage(), __pagingLink(), counter(), current(), defaultModel(), first(), hasPage(), last(), numbers(), options(), sortDir(), sortKey(), and url().
| PaginatorHelper::prev | ( | ) |
Generates a "previous" link for a set of paged records
| string | $title Title for the link. Defaults to '<< Previous'. | |
| mixed | $options Options for pagination link. See options for list of keys. | |
| string | $disabledTitle Title when the link is disabled. | |
| mixed | $disabledOptions Options for the disabled pagination link. See options for list of keys. |
Definition at line 194 of file paginator.php.
References $options, and __pagingLink().
Referenced by hasPrev().
| PaginatorHelper::sort | ( | $ | title, | |
| $ | key = null, |
|||
| $ | options = array() | |||
| ) |
Generates a sorting link
| string | $title Title for the link. | |
| string | $key The name of the key that the recordset should be sorted. | |
| array | $options Options for sorting link. See options for list of keys. |
Definition at line 218 of file paginator.php.
References $options, $url, __(), defaultModel(), humanize(), link(), Helper::model(), order, sortDir(), sortKey(), and url().
| PaginatorHelper::sortDir | ( | $ | model = null, |
|
| $ | options = array() | |||
| ) |
Gets the current direction the recordset is sorted
| string | $model Optional model name. Uses the default if none is specified. | |
| mixed | $options Options for pagination links. See options for list of keys. |
Definition at line 166 of file paginator.php.
References $options, Helper::$params, current(), options(), order, and params().
Referenced by sort().
| PaginatorHelper::sortKey | ( | $ | model = null, |
|
| $ | options = array() | |||
| ) |
Gets the current key by which the recordset is sorted
| string | $model Optional model name. Uses the default if none is specified. | |
| mixed | $options Options for pagination links. See options for list of keys. |
Definition at line 135 of file paginator.php.
References $options, Helper::$params, defaultModel(), options(), order, params(), and sort().
| PaginatorHelper::url | ( | $ | options = array(), |
|
| $ | asArray = false, |
|||
| $ | model = null | |||
| ) |
Merges passed URL options with current pagination state to generate a pagination URL.
| array | $options Pagination/URL options array | |
| boolean | $asArray | |
| string | $model Which model to paginate on |
Definition at line 277 of file paginator.php.
References $options, $url, current(), Set::diff(), options(), order, params(), sort(), and sortKey().
Referenced by __pagingLink(), link(), and sort().
| PaginatorHelper::$__defaultModel = null |
Definition at line 45 of file paginator.php.
| PaginatorHelper::$helpers = array('Html', 'Ajax') |
| PaginatorHelper::$options = array() |
1.4.7