src/Sulu/Bundle/ContactBundle/Contact/AbstractContactManager.php
public function getMainAccountContact($contact)
    {
        foreach ($contact->getAccountContacts() as $accountContact) {
            /** @var AccountContact $accountContact */
            if ($accountContact->getMain()) {
                return $accountContact;
            }
        }

        return false;
    }
public function getMainAccountContact($contact)
    {
        foreach ($contact->getAccountContacts() as $accountContact) {
            /** @var AccountContact $accountContact */
            if ($accountContact->getMain()) {
                return $accountContact;
            }
        }

        return false;
    }
public function getMainAccountContact ( $ contact ) { foreach ( $ contact -> getAccountContacts ( ) as $ accountContact ) { /** @var AccountContact $accountContact */ if ( $ accountContact -> getMain ( ) ) { return $ accountContact ; } } return false ; }
returns the main account-contact relation.

@param Contact|AccountInterface $contact

@return AccountContact|bool
returns the main account - contact relation .