src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php
public function getAccounContact(AccountInterface $account, Contact $contact)
    {
        foreach ($contact->getAccountContacts() as $accountContact) {
            /** @var AccountContact $accountContact */
            if ($accountContact->getAccount() === $account) {
                return $accountContact;
            }
        }

        return;
    }
public function getAccounContact(AccountInterface $account, Contact $contact)
    {
        foreach ($contact->getAccountContacts() as $accountContact) {
            /** @var AccountContact $accountContact */
            if ($accountContact->getAccount() === $account) {
                return $accountContact;
            }
        }

        return;
    }
public function getAccounContact ( AccountInterface $ account , Contact $ contact ) { foreach ( $ contact -> getAccountContacts ( ) as $ accountContact ) { /** @var AccountContact $accountContact */ if ( $ accountContact -> getAccount ( ) === $ account ) { return $ accountContact ; } } return ; }
Returns AccountContact relation if exists.

@param AccountInterface $account
@param Contact $contact

@return null|AccountContact
Returns AccountContact relation if exists .