Skip to content
Snippets Groups Projects
Verified Commit 8a0c28ef authored by Kevin Ditscheid's avatar Kevin Ditscheid
Browse files

[BUGFIX] ECS cleanup

parent 1861da10
No related branches found
No related tags found
1 merge request!52Feature 5168 unify root page selector
......@@ -88,7 +88,6 @@ class BackendController extends ActionController {
JobRepository $jobRepository,
ModuleTemplateFactory $moduleTemplateFactory,
FrontendUserRepository $frontendUserRepository,
) {
$this->companyRepository = $companyRepository;
$this->jobRepository = $jobRepository;
......@@ -128,20 +127,25 @@ class BackendController extends ActionController {
?? 10
);
// Store itemsPerPage in the session
// Store itemsPerPage in the session
$backendUser->pushModuleData('itemsPerPage', $itemsPerPage);
// Ensure at least 1 item per page
// Ensure at least 1 item per page
$itemsPerPage = max($itemsPerPage, 1);
// Create the query builder
// Create the query builder
$usersQueryBuilder = $this->frontendUserRepository->getUsersByPidForBackendList(
$pageUid, $filters, $itemsPerPage
$pageUid,
$filters,
$itemsPerPage
);
// 🛠 Recreate Pagination with updated values
// 🛠 Recreate Pagination with updated values
$pagination = GeneralUtility::makeInstance(
\SGalinski\SgAccount\Pagination\Pagination::class, $usersQueryBuilder, $currentPage, $itemsPerPage
\SGalinski\SgAccount\Pagination\Pagination::class,
$usersQueryBuilder,
$currentPage,
$itemsPerPage
);
$this->moduleTemplate->assign('pagination', $pagination);
......
<?php
/***************************************************************
* Copyright notice
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment