Skip to content
Snippets Groups Projects

[FEATURE] save filters in session

Merged Kevin von Spiczak requested to merge feature_3338-saveFiltersInSession into master
Files
8
@@ -31,6 +31,7 @@ use SGalinski\SgJobs\Domain\Repository\JobRepository;
use SGalinski\SgJobs\Service\BackendService;
use TYPO3\CMS\Backend\Template\Components\DocHeaderComponent;
use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
use TYPO3\CMS\Core\Messaging\FlashMessage;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
@@ -84,10 +85,19 @@ class BackendController extends ActionController {
*
* @param array $filters
* @return void
* @throws \TYPO3\CMS\Extbase\Persistence\Exception\InvalidQueryException
*/
public function indexAction(array $filters = []): void {
$pageUid = (int) GeneralUtility::_GP('id');
/** @var BackendUserAuthentication $backendUser */
$backendUser = $GLOBALS['BE_USER'];
if ($filters === []) {
$filters = $backendUser->getModuleData('tools_beuser/index.php/web_SgJobsBackend_filters', 'ses') ?: [];
} else {
$backendUser->pushModuleData('tools_beuser/index.php/web_SgJobsBackend_filters', $filters);
}
// create docheader + buttons
$pageInfo = BackendUtility::readPageAccess($pageUid, $GLOBALS['BE_USER']->getPagePermsClause(1));
if ($pageInfo === FALSE) {
Loading