How to return all EmailAddress for a Contact

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sddev
    Junior Member
    • Jun 2015
    • 15

    How to return all EmailAddress for a Contact

    Hello,

    I have an endpoint that needs to display all email addresses associated with the contact. I'm currently using: $contact->get('emailAddress'); which returns only returns the primary email. How can I get all of them?

    Thanks in advance,
    Stephen
  • sddev
    Junior Member
    • Jun 2015
    • 15

    #2
    After some more digging I found the solution with: $this->getEntityManager()->getRepository('EmailAddress')->getEmailAddressData($contact)

    Comment

    Working...