protected function getCollapseStatuses()
    {
        if ($this->collapseGroupStatusCache !== false) {
            return $this->collapseGroupStatusCache;
        }

        $groups = $this->getSession($this->collapseSessionKey, []);

        if (!is_array($groups)) {
            return $this->collapseGroupStatusCache = [];
        }

        return $this->collapseGroupStatusCache = $groups;
    }