From 00d7c655ce57fd9b33250e3ba10441604a89bd87 Mon Sep 17 00:00:00 2001 From: mark_story Date: Tue, 27 Oct 2009 13:28:43 -0400 Subject: [PATCH] Improving documentation for PaginatorHelper::sort() Fixes #210 --- cake/libs/view/helpers/paginator.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cake/libs/view/helpers/paginator.php b/cake/libs/view/helpers/paginator.php index 7b5dd09a2b1..0e8505ecf29 100644 --- a/cake/libs/view/helpers/paginator.php +++ b/cake/libs/view/helpers/paginator.php @@ -207,11 +207,13 @@ function next($title = 'Next >>', $options = array(), $disabledTitle = null, $di return $this->__pagingLink('Next', $title, $options, $disabledTitle, $disabledOptions); } /** - * Generates a sorting link + * Generates a sorting link. Sets named parameters for the sort and direction. Handles + * direction switching automatically. * - * @param string $title Title for the link. - * @param string $key The name of the key that the recordset should be sorted. - * @param array $options Options for sorting link. See #options for list of keys. + * @param string $title Title for the link. + * @param string $key The name of the key that the recordset should be sorted. If $key is null + * $title will be used for the key, and a title will be generated by inflection. + * @param array $options Options for sorting link. See #options for list of keys. * @return string A link sorting default by 'asc'. If the resultset is sorted 'asc' by the specified * key the returned link will sort by 'desc'. */