コード例 #1
0
 /**
  * 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);
 }
コード例 #2
0
 public function getSaveData($mData)
 {
     if ($this->oLanguageObject instanceof LanguageObject) {
         ReferencePeer::removeReferences($this->oLanguageObject);
         if (isset($mData['document_categories'])) {
             foreach ($mData['document_categories'] as $iCategoryId) {
                 ReferencePeer::addReference($this->oLanguageObject, array($iCategoryId, 'DocumentCategory'));
             }
         }
     }
     return parent::getSaveData($mData);
 }