fix: [components:CRUD] Support of controller's paginate public variable
parent
6005552e76
commit
dc2bfcb6b2
|
@ -88,7 +88,7 @@ class CRUDComponent extends Component
|
||||||
$this->Controller->restResponsePayload = $this->RestResponse->viewData($data, 'json');
|
$this->Controller->restResponsePayload = $this->RestResponse->viewData($data, 'json');
|
||||||
} else {
|
} else {
|
||||||
$this->Controller->loadComponent('Paginator');
|
$this->Controller->loadComponent('Paginator');
|
||||||
$data = $this->Controller->Paginator->paginate($query);
|
$data = $this->Controller->Paginator->paginate($query, $this->Controller->paginate ?? []);
|
||||||
if (isset($options['afterFind'])) {
|
if (isset($options['afterFind'])) {
|
||||||
$function = $options['afterFind'];
|
$function = $options['afterFind'];
|
||||||
if (is_callable($options['afterFind'])) {
|
if (is_callable($options['afterFind'])) {
|
||||||
|
|
Loading…
Reference in New Issue