Contact example

$contact = $this->entityManager->getReference(
                Contact::class,
                $recipient['id']
            );
            if ($contact instanceof Contact) {
                $associatedContacts[] = $contact;
            }
        }

        foreach (array_keys($unknownRecipients) as $recipient) {
            $contact = new Contact();
            $contact->setMailAddress((string) $recipient);

            $this->persistContact($contact);

            $fetchedContact = $this->entityManager->getReference(
                Contact::class,
                $contact->getId()
            );
            if ($fetchedContact instanceof Contact) {
                $associatedContacts[] = $fetchedContact;
            }
        }
Home | Imprint | This part of the site doesn't use cookies.