Adding usage and expanding doc blocks for PaginatorHelper.

This commit is contained in:
mark_story 2010-12-27 23:30:10 -05:00
parent e003bd6ea9
commit 85baa180d9

View file

@ -725,7 +725,16 @@ class PaginatorHelper extends AppHelper {
} }
/** /**
* Returns a first or set of numbers for the first pages * Returns a first or set of numbers for the first pages.
*
* `echo $this->Paginator->first('< first');`
*
* Creates a single link for the first page. Will output nothing if you are on the first page.
*
* `echo $this->Paginator->first(3);`
*
* Will create links for the first 3 pages, once you get to the third or greater page. Prior to that
* nothing will be output.
* *
* ### Options: * ### Options:
* *
@ -735,8 +744,9 @@ class PaginatorHelper extends AppHelper {
* - `separator` Content between the generated links, defaults to ' | ' * - `separator` Content between the generated links, defaults to ' | '
* - `ellipsis` Content for ellipsis, defaults to '...' * - `ellipsis` Content for ellipsis, defaults to '...'
* *
* @param mixed $first if string use as label for the link, if numeric print page numbers * @param mixed $first if string use as label for the link. If numeric, the number of page links
* @param mixed $options * you want at the beginning of the range.
* @param mixed $options An array of options.
* @return string numbers string. * @return string numbers string.
*/ */
public function first($first = '<< first', $options = array()) { public function first($first = '<< first', $options = array()) {
@ -781,7 +791,15 @@ class PaginatorHelper extends AppHelper {
} }
/** /**
* Returns a last or set of numbers for the last pages * Returns a last or set of numbers for the last pages.
*
* `echo $this->Paginator->last('last >');`
*
* Creates a single link for the last page. Will output nothing if you are on the last page.
*
* `echo $this->Paginator->last(3);`
*
* Will create links for the last 3 pages. Once you enter the page range, no output will be created.
* *
* ### Options: * ### Options:
* *