fix: [deprecation] pagination component's use removed to comply with 4.4 requirements
parent
a5c9f68316
commit
cbb737e18e
src/Controller
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -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)) {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue