Esempio n. 1
0
 protected function beforeSave()
 {
     if (!parent::beforeSave()) {
         return false;
     }
     if (!$this->checkCreatorIsAdherent()) {
         throw new PetitionRateException('Petition can be rated by mandate\'s adherents only');
     }
     return true;
 }