private function getSessionBag() { if ($this->isBackendScope()) { $name = 'contao_backend'; } else { $name = 'contao_frontend'; } /** @var AttributeBagInterface $bag */ $bag = $this->session->getBag($name); return $bag; }