fix: [components:CRUD] Support of controller's paginate public variable

cli-modification-summary
Sami Mokaddem 2022-01-21 09:35:55 +01:00 committed by Sami Mokaddem
parent 6005552e76
commit dc2bfcb6b2
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 1 additions and 1 deletions

View File

@ -88,7 +88,7 @@ class CRUDComponent extends Component
$this->Controller->restResponsePayload = $this->RestResponse->viewData($data, 'json');
} else {
$this->Controller->loadComponent('Paginator');
$data = $this->Controller->Paginator->paginate($query);
$data = $this->Controller->Paginator->paginate($query, $this->Controller->paginate ?? []);
if (isset($options['afterFind'])) {
$function = $options['afterFind'];
if (is_callable($options['afterFind'])) {