fix: [deprecation] pagination component's use removed to comply with 4.4 requirements
parent
a5c9f68316
commit
cbb737e18e
|
@ -23,8 +23,7 @@ class AlignmentsController extends AppController
|
||||||
$alignments = $query->all();
|
$alignments = $query->all();
|
||||||
return $this->RestResponse->viewData($alignments, 'json');
|
return $this->RestResponse->viewData($alignments, 'json');
|
||||||
} else {
|
} else {
|
||||||
$this->loadComponent('Paginator');
|
$alignments = $this->paginate($query);
|
||||||
$alignments = $this->Paginator->paginate($query);
|
|
||||||
$this->set('data', $alignments);
|
$this->set('data', $alignments);
|
||||||
$this->set('metaGroup', 'ContactDB');
|
$this->set('metaGroup', 'ContactDB');
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,8 +100,7 @@ class CRUDComponent extends Component
|
||||||
if ($this->metaFieldsSupported()) {
|
if ($this->metaFieldsSupported()) {
|
||||||
$query = $this->includeRequestedMetaFields($query);
|
$query = $this->includeRequestedMetaFields($query);
|
||||||
}
|
}
|
||||||
$this->Controller->loadComponent('Paginator');
|
$data = $this->Controller->paginate($query, $this->Controller->paginate ?? []);
|
||||||
$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)) {
|
||||||
|
|
|
@ -7,6 +7,7 @@ use Cake\Controller\ComponentRegistry;
|
||||||
use Cake\Http\Exception\NotFoundException;
|
use Cake\Http\Exception\NotFoundException;
|
||||||
use InvalidArgumentException;
|
use InvalidArgumentException;
|
||||||
use Cake\Controller\Component\PaginatorComponent;
|
use Cake\Controller\Component\PaginatorComponent;
|
||||||
|
use Cake\Datasource\Pagination\NumericPaginator;
|
||||||
use Cake\Utility\Hash;
|
use Cake\Utility\Hash;
|
||||||
|
|
||||||
class CustomPaginationComponent extends Component
|
class CustomPaginationComponent extends Component
|
||||||
|
|
Loading…
Reference in New Issue