Ejemplo n.º 1
0
 /**
  * @return bool
  */
 public function addParticipant()
 {
     if ($this->validate()) {
         $participant = new Participant();
         $participant->setAttributes($this->getAttributes());
         if ($participant->save()) {
             return $participant->id;
         }
     }
     return $this->getErrors();
 }