/** * getSaveData() * overwrite FrontendModule::getSaveData */ public function getSaveData($mData) { $oFlash = new Flash($mData); $oFlash->checkForValue(self::DISPLAY_MODE, 'display_mode_required'); if ($mData['display_mode'] !== 'newsletter_unsubscribe') { $oFlash->checkForValue('subscriber_group_id', 'subscriber_group_required'); } $oFlash->finishReporting(); if ($oFlash->hasMessages()) { throw new ValidationException($oFlash); } return parent::getSaveData($mData); }