Example #1
0
 /**
  * Set email
  *
  * @param Email $email
  *
  * @return EmailThread
  */
 public function addEmail(Email $email)
 {
     if (!$this->emails->contains($email)) {
         $this->emails->add($email);
     }
     return $this;
 }
Example #2
0
 /**
  * Delete Email from User
  *
  * @param  Email $email
  *
  * @return User
  */
 public function removeEmail(Email $email)
 {
     $this->emails->removeElement($email);
     return $this;
 }
Example #3
0
 /**
  * Delete Email from User
  *
  * @param Email $email
  *
  * @return User
  */
 public function removeEmail(Email $email)
 {
     if ($this->emails->contains($email)) {
         $this->emails->removeElement($email);
     }
     return $this;
 }