getContactAddresses() public method

Get contact addresses.
public getContactAddresses ( ) : Doctrine\Common\Collections\Collection
return Doctrine\Common\Collections\Collection
 /**
  * @param ContactInterface $contact
  */
 protected function persistContactAddress(ContactInterface $contact)
 {
     /** @var ContactAddress $contactAddress */
     foreach ($contact->getContactAddresses() as $contactAddress) {
         $this->entityManager->persist($contactAddress);
         if ($address = $contactAddress->getAddress()) {
             if (!$address->getAddressType()) {
                 $addressType = $this->entityManager->getRepository(AddressType::class)->find(1);
                 $address->setAddressType($addressType);
             }
             $this->entityManager->persist($address);
         }
     }
 }