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');
    }
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');
    }
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' ) ; }
Get the session bag depending on current scope.

@return AttributeBagInterface|SessionBagInterface
Get the session bag depending on current scope .