From 0fac6196705021c67ddf3c119e58fab6a601f744 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Auswo=CC=88ger?= Date: Wed, 17 Aug 2022 22:23:08 +0200 Subject: [PATCH] Symfony 6 compatibility --- src/Slider.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Slider.php b/src/Slider.php index 7457aa4..ce34fee 100644 --- a/src/Slider.php +++ b/src/Slider.php @@ -354,7 +354,7 @@ public function onloadCallback($dc) } /** @var SessionInterface $objSession */ - $objSession = System::getContainer()->get('session'); + $objSession = System::getContainer()->get('request_stack')->getSession(); // Check current action switch (Input::get('act')) { @@ -426,7 +426,7 @@ public function oncreateCallback($table, $insertId, $row, $dc) } /** @var AttributeBagInterface $objSessionBag */ - $objSessionBag = System::getContainer()->get('session')->getBag('contao_backend'); + $objSessionBag = System::getContainer()->get('request_stack')->getSession()->getBag('contao_backend'); $arrNew = $objSessionBag->get('new_records'); @@ -589,7 +589,7 @@ public function slideOnloadCallback($dc) ->execute($id); /** @var SessionInterface $objSession */ - $objSession = System::getContainer()->get('session'); + $objSession = System::getContainer()->get('request_stack')->getSession(); $session = $objSession->all(); $session['CURRENT']['IDS'] = array_intersect((array) $session['CURRENT']['IDS'], $objArchive->fetchEach('id')); @@ -683,7 +683,7 @@ private function contentCheckPermission($dc) ->execute($dc->currentPid); /** @var SessionInterface $objSession */ - $objSession = System::getContainer()->get('session'); + $objSession = System::getContainer()->get('request_stack')->getSession(); $session = $objSession->all(); $session['CURRENT']['IDS'] = array_intersect((array) $session['CURRENT']['IDS'], $objCes->fetchEach('id'));