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

pull/93/head
Sami Mokaddem 2022-01-21 09:35:55 +01:00
parent 7af31448cd
commit a59f59ba0d
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 1 additions and 1 deletions

View File

@ -96,7 +96,7 @@ class CRUDComponent extends Component
$query = $this->includeRequestedMetaFields($query); $query = $this->includeRequestedMetaFields($query);
} }
$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($function)) { if (is_callable($function)) {