protected function getSessionBag()
    {
        if ($this->scopeDeterminator->currentScopeIsBackend()) {
            return $this->session->getBag('contao_backend');
        }

        if ($this->scopeDeterminator->currentScopeIsFrontend()) {
            return $this->session->getBag('contao_frontend');
        }

        return $this->session->getBag('attributes');
    }