getEmails() публичный Метод

Get emails.
public getEmails ( ) : Doctrine\Common\Collections\Collection
Результат Doctrine\Common\Collections\Collection
Пример #1
0
 /**
  * sets Entity's Main-Email.
  *
  * @param Contact|AccountInterface $entity
  */
 public function setMainEmail($entity)
 {
     // set main to first entry or to null
     if ($entity->getEmails()->isEmpty()) {
         $entity->setMainEmail(null);
     } else {
         $entity->setMainEmail($entity->getEmails()->first()->getEmail());
     }
 }