Skip to content
Permalink
Browse files

Add finder options to Paginator->paginate method

The paginator right now doesn't send $options to any finder, custom or otherwise. This change allows setting 'finderOptions' directly from the controller's paginate array.
  • Loading branch information...
Patrick Conroy
Patrick Conroy committed Aug 25, 2014
1 parent f13c341 commit 4d5d3e1fb253100270ac2278b8300a6e33f1f773
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/Controller/Component/PaginatorComponent.php
@@ -164,7 +164,7 @@ public function paginate($object, array $settings = []) {
unset($options['finder'], $options['maxLimit']);
if (empty($query)) {
$query = $object->find($type);
$query = $object->find($type, isset($options['finderOptions']) ? $options['finderOptions'] : []);
}
$query->applyOptions($options);

0 comments on commit 4d5d3e1

Please sign in to comment.
You can’t perform that action at this time.