/** * Hook containing the actual save code. * * Call's afterSave() for user interaction. * * @see afterSave() */ protected function saveData() { parent::saveData(); if ($this->createData && !$this->roundId) { $this->roundId = $this->formData['gro_id_round']; } if ($this->formData['gro_valid_for_source'] == 'tok' && $this->formData['gro_valid_for_field'] == 'gto_valid_from' && empty($this->formData['gro_valid_for_id'])) { // Special case we should insert the current roundID here $this->formData['gro_valid_for_id'] = $this->roundId; // Now save, don't call saveData again to keep changed message as is $model = $this->getModel(); $this->formData = $model->save($this->formData); } $this->trackEngine->updateRoundCount($this->loader->getCurrentUser()->getUserId()); }