Navigation Menu

Skip to content

Commit

Permalink
Adding doc blocks for recent paginator changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Mar 13, 2014
1 parent 1f6fe1d commit 92fe0e7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/Controller/Component/PaginatorComponent.php
Expand Up @@ -128,6 +128,15 @@ class PaginatorComponent extends Component {
*
* Would paginate using the `find('popular')` method.
*
* You can also pass an already created instance of a query to this method:
*
* {{{
* $query = $this->Articles->find('popular')->matching('Tags', function($q) {
* return $q->where(['name' => 'CakePHP'])
* });
* $results = $paginator->paginate($query);
* }}}
*
* @param Cake\Datasource\RepositoryInterface|Cake\ORM\Query $object The table or query to paginate.
* @param array $settings The settings/configuration used for pagination.
* @return array Query results
Expand Down
3 changes: 2 additions & 1 deletion src/Controller/Controller.php
Expand Up @@ -656,7 +656,8 @@ public function referer($default = null, $local = false) {
*
* This method will also make the PaginatorHelper available in the view.
*
* @param Table|string $object Table to paginate (e.g: Table instance, or 'Model')
* @param Table|string|Query $object Table to paginate
* (e.g: Table instance, 'TableName' or a Query object)
* @return ORM\ResultSet Query results
* @link http://book.cakephp.org/3.0/en/controllers.html#Controller::paginate
*/
Expand Down

0 comments on commit 92fe0e7

Please sign in to comment.