public function saveState(array &$params, $reflection = null) { if ($this->registration !== null) { $params['registration'] = $this->registration->getId(); } if ($this->invitation !== null) { $params['hash'] = $this->invitation->getHash(); } parent::saveState($params, $reflection); }