fix: [deprecation] pagination component's use removed to comply with 4.4 requirements

cli-modification-summary
iglocska 2022-08-17 14:00:38 +02:00
parent a5c9f68316
commit cbb737e18e
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
3 changed files with 3 additions and 4 deletions

View File

@ -23,8 +23,7 @@ class AlignmentsController extends AppController
$alignments = $query->all();
return $this->RestResponse->viewData($alignments, 'json');
} else {
$this->loadComponent('Paginator');
$alignments = $this->Paginator->paginate($query);
$alignments = $this->paginate($query);
$this->set('data', $alignments);
$this->set('metaGroup', 'ContactDB');
}

View File

@ -100,8 +100,7 @@ class CRUDComponent extends Component
if ($this->metaFieldsSupported()) {
$query = $this->includeRequestedMetaFields($query);
}
$this->Controller->loadComponent('Paginator');
$data = $this->Controller->Paginator->paginate($query, $this->Controller->paginate ?? []);
$data = $this->Controller->paginate($query, $this->Controller->paginate ?? []);
if (isset($options['afterFind'])) {
$function = $options['afterFind'];
if (is_callable($function)) {

View File

@ -7,6 +7,7 @@ use Cake\Controller\ComponentRegistry;
use Cake\Http\Exception\NotFoundException;
use InvalidArgumentException;
use Cake\Controller\Component\PaginatorComponent;
use Cake\Datasource\Pagination\NumericPaginator;
use Cake\Utility\Hash;
class CustomPaginationComponent extends Component