Skip to content

Commit

Permalink
Remove use of deprecated Pagination Component (NOJIRA)
Browse files Browse the repository at this point in the history
  • Loading branch information
Benn Oshrin committed Oct 26, 2022
1 parent 57627d6 commit cf00ffc
Show file tree
Hide file tree
Showing 23 changed files with 23 additions and 26 deletions.
2 changes: 1 addition & 1 deletion app/src/Controller/AdHocAttributesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
use Cake\ORM\TableRegistry;

class AdHocAttributesController extends MVEAController {
public $pagination = [
public $paginate = [
'order' => [
'AdHocAttributes.tag' => 'asc'
]
Expand Down
2 changes: 1 addition & 1 deletion app/src/Controller/AddressesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
use Cake\ORM\TableRegistry;

class AddressesController extends MVEAController {
public $pagination = [
public $paginate = [
'order' => [
'Addresses.street' => 'asc'
]
Expand Down
2 changes: 1 addition & 1 deletion app/src/Controller/ApiUsersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
namespace App\Controller;

class ApiUsersController extends StandardController {
public $pagination = [
public $paginate = [
'order' => [
'ApiUsers.username' => 'asc'
]
Expand Down
2 changes: 1 addition & 1 deletion app/src/Controller/ApiV2Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ public function index() {

// This magically makes REST calls paginated... can use eg direction=,
// sort=, limit=, page=
$this->set($this->tableName, $this->Paginator->paginate($query));
$this->set($this->tableName, $this->paginate($query));

// Let the view render
$this->render('/Standard/api/v2/json/index');
Expand Down
2 changes: 1 addition & 1 deletion app/src/Controller/AuthenticationEventsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
use Cake\ORM\TableRegistry;

class AuthenticationEventsController extends MVEAController {
public $pagination = [
public $paginate = [
'order' => [
'AuthenticationEvents.id' => 'desc'
]
Expand Down
2 changes: 1 addition & 1 deletion app/src/Controller/CosController.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
use Cake\ORM\TableRegistry;

class CosController extends StandardController {
public $pagination = [
public $paginate = [
'order' => [
'Cos.name' => 'asc'
]
Expand Down
2 changes: 1 addition & 1 deletion app/src/Controller/CousController.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
//use \App\Lib\Enum\PermissionEnum;

class CousController extends StandardController {
public $pagination = [
public $paginate = [
'order' => [
'Cous.name' => 'asc'
]
Expand Down
2 changes: 1 addition & 1 deletion app/src/Controller/EmailAddressesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
use Cake\ORM\TableRegistry;

class EmailAddressesController extends MVEAController {
public $pagination = [
public $paginate = [
'order' => [
'EmailAddresses.mail' => 'asc'
]
Expand Down
2 changes: 1 addition & 1 deletion app/src/Controller/ExternalIdentitiesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
// Use extend MVEAController for breadcrumb rendering. ExternalIdentities is
// sort of an MVEA, so maybe it makes sense to treat it as such.
class ExternalIdentitiesController extends MVEAController {
public $pagination = [
public $paginate = [
'order' => [
'PrimaryName.family' => 'asc'
],
Expand Down
2 changes: 1 addition & 1 deletion app/src/Controller/ExternalIdentityRolesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
// Use extend MVEAController for breadcrumb rendering. ExternalIdentityRoles is sort of
// an MVEA, so maybe it makes sense to treat it as such.
class ExternalIdentityRolesController extends MVEAController {
public $pagination = [
public $paginate = [
'order' => [
'ExternalIdentityRoles.ordr' => 'asc',
'ExternalIdentityRoles.title' => 'asc'
Expand Down
2 changes: 1 addition & 1 deletion app/src/Controller/GroupMembersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
use Cake\Log\Log;

class GroupMembersController extends StandardController {
public $pagination = [
public $paginate = [
'order' => [
'People.primary_name.name' => 'asc'
]
Expand Down
2 changes: 1 addition & 1 deletion app/src/Controller/GroupNestingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
use Cake\Log\Log;

class GroupNestingsController extends StandardController {
public $pagination = [
public $paginate = [
'order' => [
'Group.name' => 'asc'
]
Expand Down
2 changes: 1 addition & 1 deletion app/src/Controller/GroupOwnersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
use Cake\Log\Log;

class GroupOwnersController extends StandardController {
public $pagination = [
public $paginate = [
'order' => [
'People.primary_name.name' => 'asc'
]
Expand Down
2 changes: 1 addition & 1 deletion app/src/Controller/GroupsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
use Cake\Log\Log;

class GroupsController extends StandardController {
public $pagination = [
public $paginate = [
'order' => [
'Groups.name' => 'asc'
]
Expand Down
2 changes: 1 addition & 1 deletion app/src/Controller/HistoryRecordsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
use Cake\ORM\TableRegistry;

class HistoryRecordsController extends MVEAController {
public $pagination = [
public $paginate = [
'order' => [
'HistoryRecords.id' => 'desc'
]
Expand Down
2 changes: 1 addition & 1 deletion app/src/Controller/IdentifiersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
use Cake\ORM\TableRegistry;

class IdentifiersController extends MVEAController {
public $pagination = [
public $paginate = [
'order' => [
'Identifiers.identifier' => 'asc'
]
Expand Down
2 changes: 1 addition & 1 deletion app/src/Controller/NamesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
use Cake\ORM\TableRegistry;

class NamesController extends MVEAController {
public $pagination = [
public $paginate = [
'order' => [
'Names.family' => 'asc',
'Names.given' => 'asc'
Expand Down
2 changes: 1 addition & 1 deletion app/src/Controller/PeopleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
use Cake\ORM\TableRegistry;

class PeopleController extends StandardController {
public $pagination = [
public $paginate = [
'order' => [
// XXX this will sort by family name, but it this universally correct?
// so we need a configuration, or can we do something automagic?
Expand Down
2 changes: 1 addition & 1 deletion app/src/Controller/PersonRolesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
// Use extend MVEAController for breadcrumb rendering. PersonRoles is sort of
// an MVEA, so maybe it makes sense to treat it as such.
class PersonRolesController extends MVEAController {
public $pagination = [
public $paginate = [
'order' => [
'PersonRoles.ordr' => 'asc',
'PersonRoles.title' => 'asc'
Expand Down
5 changes: 1 addition & 4 deletions app/src/Controller/StandardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -499,10 +499,7 @@ public function index() {
}
}

// The Cake documents describe $this->paginate (which worked in Cake 2),
// but it doesn't seem to work in Cake 4. So we just use $this->pagination
// ourselves here.
$resultSet = $this->Paginator->paginate($query, $this->pagination);
$resultSet = $this->paginate($query);

$this->set($tableName, $resultSet);
$this->set('vv_permission_set', $this->RegistryAuth->calculatePermissionsForResultSet($resultSet));
Expand Down
2 changes: 1 addition & 1 deletion app/src/Controller/TelephoneNumbersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
use Cake\ORM\TableRegistry;

class TelephoneNumbersController extends MVEAController {
public $pagination = [
public $paginate = [
'order' => [
'TelephoneNumbers.number' => 'asc'
]
Expand Down
2 changes: 1 addition & 1 deletion app/src/Controller/TypesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
use Cake\Log\Log;

class TypesController extends StandardController {
public $pagination = [
public $paginate = [
'order' => [
'Types.attribute' => 'asc',
'Types.display_name' => 'asc'
Expand Down
2 changes: 1 addition & 1 deletion app/src/Controller/UrlsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
use Cake\ORM\TableRegistry;

class UrlsController extends MVEAController {
public $pagination = [
public $paginate = [
'order' => [
'Urls.url' => 'asc'
]
Expand Down

0 comments on commit cf00ffc

Please sign in to comment.