/** * Save a tree node states instance to the session. * * @param TreeNodeStates $states The instance to be saved. * * @return void */ protected function saveTreeNodeStates(TreeNodeStates $states) { $sessionStorage = $this->getEnvironment()->getSessionStorage(); $sessionStorage->set($this->getToggleId(), $states->getStates()); }